Uptime plugin (reboot monitor)

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

But ever increasing? What is your PHP os? Is it 64-bit?

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?
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

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.
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

Centos 4 32bit 2.6.9-42.0.10.EL,

net-snmp-devel-5.1.2-11.EL4.10.0.1
net-snmp-5.1.2-11.EL4.10.0.1
php-snmp-4.3.9-3.22.5
net-snmp-libs-5.1.2-11.EL4.10.0.1
net-snmp-utils-5.1.2-11.EL4.10.0.1
achea
Posts: 6
Joined: Mon Sep 24, 2007 10:01 pm

Post by achea »

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?
ariesow
Posts: 2
Joined: Sun Aug 19, 2007 8:44 am
Location: Malaysia

Post by ariesow »

My environment her a lot devices and most probably that 10 records is no sufficient for the records. is that possible to me to make it display more than 10 records in the "UPTIME" tab ?
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

Anyone tried this plugin in 0.8.7 yet?
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Yes - I have it working on 0.8.7
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
kurowsky
Cacti User
Posts: 52
Joined: Wed Feb 04, 2004 4:43 pm
Location: Richmond, VA.

Patch for 8.7 with auto reload reason

Post by kurowsky »

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.
Attachments
check-uptime.patch
copy to ../plugins/uptime/
patch < check-uptime.patch
(3.48 KiB) Downloaded 679 times
Last edited by kurowsky on Mon Nov 19, 2007 3:56 pm, edited 1 time in total.
Kurowsky
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

These changes look good. However, I'm running windows - could you post the actual check-uptime.php file you have working ?

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
kurowsky
Cacti User
Posts: 52
Joined: Wed Feb 04, 2004 4:43 pm
Location: Richmond, VA.

Post by kurowsky »

Absolutely.
Attachments
check-uptime.zip
check-uptime.php
(1.19 KiB) Downloaded 616 times
check-uptime.tar.gz
check-uptime.php
(1.21 KiB) Downloaded 740 times
Kurowsky
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

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
kurowsky
Cacti User
Posts: 52
Joined: Wed Feb 04, 2004 4:43 pm
Location: Richmond, VA.

Post by kurowsky »

the include for Thold functions was changed from

Code: Select all

thold-functions.php
to

Code: Select all

thold_funtions.php.
Back up your original check-uptime.php and try the new one.
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
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

Think that might of done the trick!!

hopefully its also solved the issue where the counters wrap around after 7 days and tell me all the devices have rebooted (see thread)... will post back in 8 days..
User avatar
chrisgapske
Cacti User
Posts: 278
Joined: Tue May 22, 2007 7:56 am
Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL

Error

Post by chrisgapske »

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"
myfreeke
Cacti User
Posts: 82
Joined: Tue Dec 04, 2007 10:24 pm

Post by myfreeke »

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
Attachments
uptime-plugin-error.JPG
uptime-plugin-error.JPG (86.03 KiB) Viewed 10565 times
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests