Uptime plugin (reboot monitor)
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
But ever increasing? What is your PHP os? Is it 64-bit?
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- adrianmarsh
- Cacti User
- Posts: 437
- Joined: Wed Aug 17, 2005 8:51 am
- Location: UK
I'll capture an example snmpwalk on the next "reboot" to see if its the client or the plugin..
Last edited by adrianmarsh on Tue Sep 18, 2007 10:28 am, edited 1 time in total.
- adrianmarsh
- Cacti User
- Posts: 437
- Joined: Wed Aug 17, 2005 8:51 am
- Location: UK
i use the host.php patch
with Plugin Architecture1.1 and cacti 0.8.6j
In the Device page I can see the uptime column
but it also report an error :
Notice: Undefined index: host_status in /var/www/html/cacti/host.php on line 804
part of the host.php:
if (!empty($_SESSION["sess_host_status"])) {
if ($_SESSION["sess_host_status"] != $_REQUEST["host_status"]) { $_REQUEST["page"] = 1; } }
anyone know whats wrong?
with Plugin Architecture1.1 and cacti 0.8.6j
In the Device page I can see the uptime column
but it also report an error :
Notice: Undefined index: host_status in /var/www/html/cacti/host.php on line 804
part of the host.php:
if (!empty($_SESSION["sess_host_status"])) {
if ($_SESSION["sess_host_status"] != $_REQUEST["host_status"]) { $_REQUEST["page"] = 1; } }
anyone know whats wrong?
- adrianmarsh
- Cacti User
- Posts: 437
- Joined: Wed Aug 17, 2005 8:51 am
- Location: UK
Patch for 8.7 with auto reload reason
I still like this plugin, I don't really have a need for the full blown manage plugin.
Here's my patched check-uptime.php file.
Works with Cacti 8.7, PA 1.3, and Spine (as far as I can tell ...)
Also made a change to auto-fill the reload reason for cisco devices.
Included in email notifications.
Here's my patched check-uptime.php file.
Works with Cacti 8.7, PA 1.3, and Spine (as far as I can tell ...)
Also made a change to auto-fill the reload reason for cisco devices.
Included in email notifications.
- Attachments
-
- check-uptime.patch
- copy to ../plugins/uptime/
patch < check-uptime.patch - (3.48 KiB) Downloaded 613 times
Last edited by kurowsky on Mon Nov 19, 2007 3:56 pm, edited 1 time in total.
Kurowsky
Absolutely.
- Attachments
-
- check-uptime.zip
- check-uptime.php
- (1.19 KiB) Downloaded 512 times
-
- check-uptime.tar.gz
- check-uptime.php
- (1.21 KiB) Downloaded 584 times
Kurowsky
- adrianmarsh
- Cacti User
- Posts: 437
- Joined: Wed Aug 17, 2005 8:51 am
- Location: UK
My current (Original version) gives the below output when I manually run the poller.. do you changes "fix" those:
12/11/2007 06:25:10 PM - WEATHERMAP: Poller[0] ColourFromPercent: Clipped node1176241292-node1176241508 103.241590744% to 100%
[root@ubiq-serv6 cacti]# PHP Notice: Undefined variable: config in /var/www/html/cacti/plugins/uptime/check-uptime.php on line 5
PHP Warning: include_once(/plugins/thold/thold-functions.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/uptime/check-uptime.php on line 5
PHP Warning: include_once(): Failed opening '/plugins/thold/thold-functions.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/cacti/plugins/uptime/check-uptime.php on line 5
PHP Notice: Undefined variable: config in /var/www/html/cacti/plugins/uptime/check-uptime.php on line 6
PHP Warning: include_once(/lib/snmp.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/uptime/check-uptime.php on line 6
PHP Warning: include_once(): Failed opening '/lib/snmp.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/cacti/plugins/uptime/check-uptime.php on line 6
PHP Fatal error: Call to undefined function read_config_option() in /var/www/html/cacti/plugins/uptime/check-uptime.php on line 8
12/11/2007 06:25:10 PM - WEATHERMAP: Poller[0] ColourFromPercent: Clipped node1176241292-node1176241508 103.241590744% to 100%
[root@ubiq-serv6 cacti]# PHP Notice: Undefined variable: config in /var/www/html/cacti/plugins/uptime/check-uptime.php on line 5
PHP Warning: include_once(/plugins/thold/thold-functions.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/uptime/check-uptime.php on line 5
PHP Warning: include_once(): Failed opening '/plugins/thold/thold-functions.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/cacti/plugins/uptime/check-uptime.php on line 5
PHP Notice: Undefined variable: config in /var/www/html/cacti/plugins/uptime/check-uptime.php on line 6
PHP Warning: include_once(/lib/snmp.php): failed to open stream: No such file or directory in /var/www/html/cacti/plugins/uptime/check-uptime.php on line 6
PHP Warning: include_once(): Failed opening '/lib/snmp.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/cacti/plugins/uptime/check-uptime.php on line 6
PHP Fatal error: Call to undefined function read_config_option() in /var/www/html/cacti/plugins/uptime/check-uptime.php on line 8
the include for Thold functions was changed from to
Back up your original check-uptime.php and try the new one.
Should resolve the issue.
This is my set up:
Code: Select all
thold-functions.php
Code: Select all
thold_funtions.php.
Should resolve the issue.
This is my set up:
Cacti Version - 0.8.7
Plugin Architecture - 1.3
Poller Type - Cactid v
Server Info - Linux 2.6.17-2-686
Web Server - Apache
PHP - 5.2.3-1+lenny1
PHP Extensions - zip, xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, mysql, gd, mysqli, PDO, pdo_mysql, snmp
MySQL - 5.0.45-Debian_1-log
RRDTool - 1.2.19
SNMP - 5.2.3
Plugins
- Global Plugin Settings (settings - v0.3)
Host Info (hostinfo - v0.2)
Update Checker (update - v0.4)
ReportIt (ReportIt - v0.5.1)
Real-time statistics (zond - v0.33)
Read-only Devices Tab (devices - v0.4)
Uptime (uptime - v0.3)
Thresholds (thold - v0.3.8)
Network Discovery (discovery - v0.8.2)
Device Tracking (mactrack - v1.1)
Syslog Monitoring (syslog - v0.5.1)
SuperLinks (superlinks - v0.7)
Kurowsky
- adrianmarsh
- Cacti User
- Posts: 437
- Joined: Wed Aug 17, 2005 8:51 am
- Location: UK
- chrisgapske
- Cacti User
- Posts: 278
- Joined: Tue May 22, 2007 7:56 am
- Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL
Error
I get this error when I look at the device page.
I am not sure where I need to look but It looks like there is a table or field missing from SQL?
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '30' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '21' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '131' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '155' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '59' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '210' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '67' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '135' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '160' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '36' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '64' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '61' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '156' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '185' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '192' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '191' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '128' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '71' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '46' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '91' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '98' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '99' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '56' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '121' and host.uptime = 'on' and host.id = uptime.id"
I am not sure where I need to look but It looks like there is a table or field missing from SQL?
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '30' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '21' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '131' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '155' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '59' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '210' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '67' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '135' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '160' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '36' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '64' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '61' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '156' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '185' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '192' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '191' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '128' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '71' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '46' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '91' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '98' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '99' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '56' and host.uptime = 'on' and host.id = uptime.id"
12/17/2007 10:32:56 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT uptime.id, uptime.uptime FROM uptime,host where host.id = '121' and host.uptime = 'on' and host.id = uptime.id"
I use uptime plugin and have some question
I choose "Devices" view error:
Warning: Missing argument 10 for cacti_snmp_get(), called in /var/monitor/cacti/host.php on line 574 and defined in /var/monitor/cacti/lib/snmp.php on line 39
Warning: Missing argument 10 for cacti_snmp_get(), called in /var/monitor/cacti/host.php on line 579 and defined in /var/monitor/cacti/lib/snmp.php on line 39
Warning: Missing argument 10 for cacti_snmp_get(), called in /var/monitor/cacti/host.php on line 580 and defined in /var/monitor/cacti/lib/snmp.php on line 39
Warning: Missing argument 10 for cacti_snmp_get(), called in /var/monitor/cacti/host.php on line 581 and defined in /var/monitor/cacti/lib/snmp.php on line 39
Warning: Missing argument 10 for cacti_snmp_get(), called in /var/monitor/cacti/host.php on line 582 and defined in /var/monitor/cacti/lib/snmp.php on line 39
I choose "Devices" view error:
Warning: Missing argument 10 for cacti_snmp_get(), called in /var/monitor/cacti/host.php on line 574 and defined in /var/monitor/cacti/lib/snmp.php on line 39
Warning: Missing argument 10 for cacti_snmp_get(), called in /var/monitor/cacti/host.php on line 579 and defined in /var/monitor/cacti/lib/snmp.php on line 39
Warning: Missing argument 10 for cacti_snmp_get(), called in /var/monitor/cacti/host.php on line 580 and defined in /var/monitor/cacti/lib/snmp.php on line 39
Warning: Missing argument 10 for cacti_snmp_get(), called in /var/monitor/cacti/host.php on line 581 and defined in /var/monitor/cacti/lib/snmp.php on line 39
Warning: Missing argument 10 for cacti_snmp_get(), called in /var/monitor/cacti/host.php on line 582 and defined in /var/monitor/cacti/lib/snmp.php on line 39
- Attachments
-
- uptime-plugin-error.JPG (86.03 KiB) Viewed 10276 times
Who is online
Users browsing this forum: No registered users and 0 guests