SHARE
TWEET

./poller.php -h HOSTNAME -d -r -f -m os

a guest May 19th, 2017 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. shorepower@SPI-NMS-01:/opt/librenms$ ./poller.php -h Localhost -d -r -f -m os
  2. LibreNMS Poller
  3. ===================================
  4. Version info:
  5. Commit SHA: 4d0c75343efbce2938c633084cab039672c78904
  6. Commit Date: 1495141690
  7. DB Schema: 192
  8. PHP: 7.0.15-0ubuntu0.16.04.4
  9. MySQL: 10.0.29-MariaDB-0ubuntu0.16.04.1
  10. RRDTool: 1.5.5
  11. SNMP: NET-SNMP 5.7.3
  12. ==================================DEBUG!
  13. Starting polling run:
  14.  
  15. SQL[SELECT * FROM `devices` WHERE `disabled` = 0 AND `hostname` = 'Localhost' ORDER BY `device_id` ASC]
  16. SQL[SELECT * FROM devices_attribs WHERE `device_id` = '1']
  17. Hostname: localhost
  18. Device ID: 1
  19. OS: linux (unix)
  20.  
  21. SQL[INSERT INTO `device_perf` (`xmt`,`rcv`,`loss`,`min`,`max`,`avg`,`device_id`,`timestamp`)  VALUES ('3','3','0','0.03','0.04','0.03','1',NOW())]
  22. SNMP Check response code: 0
  23. SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -OQnUst -m SNMPv2-MIB:HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/supermicro udp:HOSTNAME:161 sysUpTime.0 sysLocation.0 sysContact.0 sysName.0 sysObjectID.0]
  24. sysUpTime.0 = 9148554
  25. sysLocation.0 = Rack, Room, Building, City, Country [GPSX,Y]
  26. sysContact.0 = Your Name <your@email.address>
  27. sysName.0 = SPI-NMS-01
  28. sysObjectID.0 = enterprises.8*
  29.  
  30. SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -OvQ -m SNMPv2-MIB:HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/supermicro udp:HOSTNAME:161 sysDescr.0]
  31. Linux SPI-NMS-01 4.4.0-63-generic #84-Ubuntu SMP Wed Feb 1 17:20:32 UTC 2017 x86_64
  32.  
  33. SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -OQnUst -m HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/supermicro udp:HOSTNAME:161 snmpEngineTime.0 hrSystemUptime.0]
  34. snmpEngineTime.0 = 91485
  35. hrSystemUptime.0 = 9150448
  36.  
  37. Using hrSystemUptime (91504s)
  38. RRD[update /opt/librenms/rrd/localhost/uptime.rrd N:91504]
  39. [RRD Disabled]Uptime: 1 day, 1h 25m 4s
  40. SQL[SELECT `lat`,`lng` FROM `locations` WHERE `location`='SPI-HV-01' LIMIT 1]
  41. Using cached lat/lng from other device
  42. Modules status: Global+ OS  Device
  43. #### Load poller module os ####
  44. SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqv -m NET-SNMP-EXTEND-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/supermicro udp:HOSTNAME:161 .1.3.6.1.4.1.8072.1.3.2.3.1.1.6.100.105.115.116.114.111]
  45. No Such Instance currently exists at this OID
  46.  
  47. SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqv -m UCD-SNMP-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/supermicro udp:HOSTNAME:161 .1.3.6.1.4.1.2021.7890.1.3.1.1.6.100.105.115.116.114.111]
  48. "Ubuntu 16.04"
  49.  
  50. SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqv -m MIB-Dell-10892 -M /opt/librenms/mibs:/opt/librenms/mibs/supermicro udp:HOSTNAME:161 .1.3.6.1.4.1.674.10892.1.300.10.1.9.1]
  51. No Such Object available on this agent at this OID
  52.  
  53. SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqv -m CPQSINFO-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/supermicro:/opt/librenms/mibs/hp udp:HOSTNAME:161 cpqSiProductName.0]
  54. No Such Object available on this agent at this OID
  55.  
  56. SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqv -M /opt/librenms/mibs:/opt/librenms/mibs/supermicro udp:HOSTNAME:161 .1.3.6.1.4.1.2021.7890.2.4.1.2.8.104.97.114.100.119.97.114.101.1]
  57. No Such Object available on this agent at this OID
  58.  
  59. SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqv -M /opt/librenms/mibs:/opt/librenms/mibs/supermicro udp:HOSTNAME:161 .1.3.6.1.4.1.2021.7890.3.4.1.2.12.109.97.110.117.102.97.99.116.117.114.101.114.1]
  60. No Such Object available on this agent at this OID
  61.  
  62. SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqv -m MIB-Dell-10892 -M /opt/librenms/mibs:/opt/librenms/mibs/supermicro udp:HOSTNAME:161 .1.3.6.1.4.1.674.10892.1.300.10.1.11.1]
  63. No Such Object available on this agent at this OID
  64.  
  65. SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqv -M /opt/librenms/mibs:/opt/librenms/mibs/supermicro udp:HOSTNAME:161 .1.3.6.1.4.1.2021.7890.4.4.1.2.6.115.101.114.105.97.108.1]
  66. No Such Object available on this agent at this OID
  67.  
  68. Hardware: Generic x86 64-bit
  69. Version: 4.4.0-63-generic
  70. Features: Ubuntu 16.04
  71. Serial:
  72.  
  73. >> Runtime for poller module 'os': 0.3049 seconds with 3920 bytes
  74. #### Unload poller module os ####
  75.  
  76. RRD[update /opt/librenms/rrd/localhost/poller-perf-os.rrd N:0.30486607551575]
  77. [RRD Disabled]### Start Device Groups ###
  78. SQL[SELECT * FROM device_groups ORDER BY name]
  79. SQL[SELECT `device_group_id` FROM `device_group_device` WHERE `device_id`='1']
  80. Groups Added:
  81. Groups Removed:
  82. ### End Device Groups ###
  83. RRD[update /opt/librenms/rrd/localhost/poller-perf.rrd N:0.793]
  84. [RRD Disabled]RRD[update /opt/librenms/rrd/localhost/ping-perf.rrd N:0.03]
  85. [RRD Disabled]Polled in 0.793 seconds
  86. Updating localhost
  87. SQL[UPDATE `devices` set `uptime` ='91504',`last_ping` =NOW(),`last_ping_timetaken` ='0.03',`last_polled` =NOW(),`last_polled_timetaken` ='0.793' WHERE `device_id` = '1']
  88. UPDATED!
  89. #### Start Alerts ####
  90. SQL[SELECT `device_group_id` FROM `device_group_device` WHERE `device_id`='1']
  91. SQL[SELECT alert_schedule.schedule_id FROM alert_schedule LEFT JOIN alert_schedule_items ON alert_schedule.schedule_id=alert_schedule_items.schedule_id WHERE ( alert_schedule_items.target = '1' ) && ((alert_schedule.recurring = 0 AND (NOW() BETWEEN alert_schedule.start AND alert_schedule.end)) OR (alert_schedule.recurring = 1 AND (alert_schedule.start_recurring_dt <= date_format(NOW(), '--%d') AND (end_recurring_dt >= date_format(NOW(), '--%d') OR end_recurring_dt is NULL OR end_recurring_dt = '0000-00-00' OR end_recurring_dt = '')) AND (date_format(now(), '%H:%i:%s') BETWEEN `start_recurring_hr` AND end_recurring_hr) AND (recurring_day LIKE CONCAT('%',date_format(now(), ''),'%') OR recurring_day is null or recurring_day = ''))) LIMIT 1]
  92. SQL[SELECT `device_group_id` FROM `device_group_device` WHERE `device_id`='1']
  93. SQL[SELECT alert_rules.* FROM alert_rules LEFT JOIN alert_map ON alert_rules.id=alert_map.rule WHERE alert_rules.disabled = 0 && ( (alert_rules.device_id = -1 || alert_rules.device_id = '1' ) || alert_map.target = '1'  )]
  94. Rule #1 (Devices up/down):
  95. SQL[SELECT state FROM alerts WHERE rule_id = '1' && device_id = '1' ORDER BY id DESC LIMIT 1]
  96. SQL[SELECT * FROM devices WHERE (devices.device_id = '1') && (((devices.status = 0  &&  ((devices.disabled = 0  &&  devices.ignore = 0)))) = "1")]
  97. Status: NOCHG
  98. Rule #2 (Device rebooted):
  99. SQL[SELECT state FROM alerts WHERE rule_id = '2' && device_id = '1' ORDER BY id DESC LIMIT 1]
  100. SQL[SELECT * FROM devices WHERE (devices.device_id = '1') && (devices.uptime < "300"  &&  ((devices.disabled = 0  &&  devices.ignore = 0)) = "1")]
  101. Status: NOCHG
  102. Rule #3 (BGP Session down):
  103. SQL[SELECT state FROM alerts WHERE rule_id = '3' && device_id = '1' ORDER BY id DESC LIMIT 1]
  104. SQL[SELECT * FROM bgpPeers,devices WHERE (( devices.device_id = bgpPeers.device_id ) && bgpPeers.device_id = '1') && (bgpPeers.bgpPeerState != "established"  &&  ((devices.status = 1  &&  ((devices.disabled = 0  &&  devices.ignore = 0)))) = "1")]
  105. Status: NOCHG
  106. Rule #4 (BGP Session established):
  107. SQL[SELECT state FROM alerts WHERE rule_id = '4' && device_id = '1' ORDER BY id DESC LIMIT 1]
  108. SQL[SELECT * FROM bgpPeers,devices WHERE (( devices.device_id = bgpPeers.device_id ) && bgpPeers.device_id = '1') && (bgpPeers.bgpPeerFsmEstablishedTime < "300"  &&  bgpPeers.bgpPeerState = "established"  &&  ((devices.status = 1  &&  ((devices.disabled = 0  &&  devices.ignore = 0)))) = "1")]
  109. Status: NOCHG
  110. Rule #5 (Port status up/down):
  111. SQL[SELECT state FROM alerts WHERE rule_id = '5' && device_id = '1' ORDER BY id DESC LIMIT 1]
  112. SQL[SELECT * FROM ports WHERE (ports.device_id = '1') && (((ports.ifOperStatus = "down"  &&  ports.ifAdminStatus != "down"  &&  ((ports.deleted = 0  &&  ports.ignore = 0  &&  ports.disabled = 0)))) = "1")]
  113. Status: NOCHG
  114. Rule #6 (Port utilisation over threshold):
  115. SQL[SELECT state FROM alerts WHERE rule_id = '6' && device_id = '1' ORDER BY id DESC LIMIT 1]
  116. SQL[SELECT * FROM ports WHERE (ports.device_id = '1') && ((((ports.ifInOctets_rate*8) / ports.ifSpeed)*100) >= "80"  &&  ((ports.ifOperStatus = "up"  &&  ports.ifAdminStatus = "up"  &&  ((ports.deleted = 0  &&  ports.ignore = 0  &&  ports.disabled = 0)))) = "1"  &&  ((ports.deleted = 0  &&  ports.ignore = 0  &&  ports.disabled = 0)) = "1")]
  117. Status: NOCHG
  118. Rule #7 (Sensor over limit):
  119. SQL[SELECT state FROM alerts WHERE rule_id = '7' && device_id = '1' ORDER BY id DESC LIMIT 1]
  120. SQL[SELECT * FROM sensors,devices WHERE (( devices.device_id = sensors.device_id ) && sensors.device_id = '1') && (sensors.sensor_current > sensors.sensor_limit  &&  sensors.sensor_alert = "1"  &&  ((devices.status = 1  &&  ((devices.disabled = 0  &&  devices.ignore = 0)))) = "1")]
  121. Status: NOCHG
  122. Rule #8 (Sensor under limit):
  123. SQL[SELECT state FROM alerts WHERE rule_id = '8' && device_id = '1' ORDER BY id DESC LIMIT 1]
  124. SQL[SELECT * FROM sensors,devices WHERE (( devices.device_id = sensors.device_id ) && sensors.device_id = '1') && (sensors.sensor_current < sensors.sensor_limit_low  &&  sensors.sensor_alert = "1"  &&  ((devices.status = 1  &&  ((devices.disabled = 0  &&  devices.ignore = 0)))) = "1")]
  125. Status: NOCHG
  126. Rule #9 (Service up/down):
  127. SQL[SELECT state FROM alerts WHERE rule_id = '9' && device_id = '1' ORDER BY id DESC LIMIT 1]
  128. SQL[SELECT * FROM services,devices WHERE (( devices.device_id = services.device_id ) && services.device_id = '1') && (services.service_status != "0"  &&  ((devices.status = 1  &&  ((devices.disabled = 0  &&  devices.ignore = 0)))) = "1")]
  129. Status: NOCHG
  130. Rule #10 (Wireless Sensor over limit):
  131. SQL[SELECT state FROM alerts WHERE rule_id = '10' && device_id = '1' ORDER BY id DESC LIMIT 1]
  132. SQL[SELECT * FROM wireless_sensors,devices WHERE (( devices.device_id = wireless_sensors.device_id ) && wireless_sensors.device_id = '1') && (wireless_sensors.sensor_current >= wireless_sensors.sensor_limit  &&  wireless_sensors.sensor_alert = "1"  &&  ((devices.status = 1  &&  ((devices.disabled = 0  &&  devices.ignore = 0)))) = "1")]
  133. Status: NOCHG
  134. Rule #11 (Wireless Sensor under limit):
  135. SQL[SELECT state FROM alerts WHERE rule_id = '11' && device_id = '1' ORDER BY id DESC LIMIT 1]
  136. SQL[SELECT * FROM wireless_sensors,devices WHERE (( devices.device_id = wireless_sensors.device_id ) && wireless_sensors.device_id = '1') && (wireless_sensors.sensor_current <= wireless_sensors.sensor_limit_low  &&  wireless_sensors.sensor_alert = "1"  &&  ((devices.status = 1  &&  ((devices.disabled = 0  &&  devices.ignore = 0)))) = "1")]
  137. Status: NOCHG
  138. #### End Alerts ####
  139. SQL[INSERT INTO `perf_times` (`type`,`doing`,`start`,`duration`,`devices`,`poller`)  VALUES ('poll','Localhost','1495226855.7567','0.859','1','SPI-NMS-01\n')]
  140. ./poller.php Localhost 2017-05-19 16:47:36 - 1 devices polled in 0.859 secs
  141. SNMP: Get[12/0.37s] Walk [0/0.00s]
  142. MySQL: Cell[3/0.00s] Row[12/0.00s] Rows[17/0.01s] Column[3/0.00s] Update[1/0.00s] Insert[2/0.01s] Delete[0/0.00s]
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top