Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.46 KB | None | 0 0
  1. capsd-configuration.xml:
  2.  
  3. <protocol-plugin protocol="ALLNET-SENSORS" class-name="org.opennms.netmgt.capsd.plugins.HttpPlugin" scan="on" user-defined="true">
  4. <property key="port" value="80" />
  5. <property key="timeout" value="5000" />
  6. <property key="retry" value="2" />
  7. <property key="url" value="/xml"/>
  8. </protocol-plugin>
  9.  
  10.  
  11. collectd-configuration.xml:
  12.  
  13. <package name="example1">
  14. <filter>IPADDR != '0.0.0.0'</filter>
  15. <include-range begin="1.1.1.1" end="254.254.254.254"/>
  16.  
  17. .....
  18.  
  19. <service name="ALLNET-SENSORS" interval="300000" user-defined="false" status="on" >
  20. <parameter key="collection" value="ALLNET" />
  21. <parameter key="timeout" value="5000" />
  22. <parameter key="retry" value="2" />
  23. </service>
  24. </package>
  25.  
  26.  
  27. <collector service="ALLNET-SENSORS" class-name="org.opennms.netmgt.collectd.HttpCollector" />
  28.  
  29.  
  30.  
  31. http-datacollection-config.xml:
  32.  
  33. <http-collection name="ALLNET">
  34. <rrd step="300">
  35. <rra>RRA:AVERAGE:0.5:1:2016</rra>
  36. <rra>RRA:AVERAGE:0.5:12:1488</rra>
  37. <rra>RRA:AVERAGE:0.5:288:366</rra>
  38. <rra>RRA:MAX:0.5:288:366</rra>
  39. <rra>RRA:MIN:0.5:288:366</rra>
  40. </rrd>
  41. <uris>
  42. <uri name="XML">
  43. <url path="/xml"
  44. matches=".*<devicename>(.*)<\/devicename>.*<n0>(.*)<\/n0>.*<t0>(.*)<\/t0>.*<min0>(.*)<\/min0>.*<max0>(.*)<\/max0>.*<n1>(.*)<\/n1>.*<t1>(.*)<\/t1>.*<min1>(.*)<\/min1>.*<max1>(.*)<\/max1>.*<n2>(.*)<\/n2>.*<t2>(.*)<\/t2>.*<min2>(.*)<\/min2>.*<max2>(.*)<\/max2>.*<n3>(.*)<\/n3>.*<t3>(.*)<\/t3>.*<min3>(.*)<\/min3>.*<max3>(.*)<\/max3>.*<n4>(.*)<\/n4>.*<t4>(.*)<\/t4>.*<min4>(.*)<\/min4>.*<max4>(.*)<\/max4>.*<n5>(.*)<\/n5>.*<t5>(.*)<\/t5>.*<min5>(.*)<\/min5>.*<max5>(.*)<\/max5>.*<n6>(.*)<\/n6>.*<t6>(.*)<\/t6>.*<min6>(.*)<\/min6>.*<max6>(.*)<\/max6>.*<n7>(.*)<\/n7>.*<t7>(.*)<\/t7>.*<min7>(.*)<\/min7>.*<max7>(.*)<\/max7>.*<n8>(.*)<\/n8>.*<t8>(.*)<\/t8>.*<min8>(.*)<\/min8>.*<max8>(.*)<\/max8>.*<n9>(.*)<\/n9>.*<t9>(.*)<\/t9>.*<min9>(.*)<\/min9>.*<max9>(.*)<\/max9>.*"
  45. response-range="100-399" >
  46. </url>
  47. <attributes>
  48. <attrib alias="wsSensor0Value" match-group="3" type="gauge32"/>
  49. <attrib alias="wsSensor0Min" match-group="4" type="gauge32"/>
  50. <attrib alias="wsSensor0Max" match-group="5" type="gauge32"/>
  51. <attrib alias="wsSensor1Value" match-group="7" type="gauge32"/>
  52. <attrib alias="wsSensor1Min" match-group="8" type="gauge32"/>
  53. <attrib alias="wsSensor1Max" match-group="9" type="gauge32"/>
  54. <attrib alias="wsSensor2Value" match-group="11" type="gauge32"/>
  55. <attrib alias="wsSensor2Min" match-group="12" type="gauge32"/>
  56. <attrib alias="wsSensor2Max" match-group="13" type="gauge32"/>
  57. <attrib alias="wsSensor3Value" match-group="15" type="gauge32"/>
  58. <attrib alias="wsSensor3Min" match-group="16" type="gauge32"/>
  59. <attrib alias="wsSensor3Max" match-group="17" type="gauge32"/>
  60. <attrib alias="wsSensor4Value" match-group="19" type="gauge32"/>
  61. <attrib alias="wsSensor4Min" match-group="20" type="gauge32"/>
  62. <attrib alias="wsSensor4Max" match-group="21" type="gauge32"/>
  63. <attrib alias="wsSensor5Value" match-group="23" type="gauge32"/>
  64. <attrib alias="wsSensor5Min" match-group="24" type="gauge32"/>
  65. <attrib alias="wsSensor5Max" match-group="25" type="gauge32"/>
  66. <attrib alias="wsSensor6Value" match-group="27" type="gauge32"/>
  67. <attrib alias="wsSensor6Min" match-group="28" type="gauge32"/>
  68. <attrib alias="wsSensor6Max" match-group="29" type="gauge32"/>
  69. <attrib alias="wsSensor7Value" match-group="31" type="gauge32"/>
  70. <attrib alias="wsSensor7Min" match-group="32" type="gauge32"/>
  71. <attrib alias="wsSensor7Max" match-group="33" type="gauge32"/>
  72. <attrib alias="wsSensor8Value" match-group="35" type="gauge32"/>
  73. <attrib alias="wsSensor8Min" match-group="36" type="gauge32"/>
  74. <attrib alias="wsSensor8Max" match-group="37" type="gauge32"/>
  75. <attrib alias="wsSensor9Value" match-group="39" type="gauge32"/>
  76. <attrib alias="wsSensor9Min" match-group="40" type="gauge32"/>
  77. <attrib alias="wsSensor9Max" match-group="41" type="gauge32"/>
  78. </attributes>
  79. </uri>
  80. </uris>
  81. </http-collection>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement