Uptime plugin (reboot monitor)

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

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

Post by TheWitness »

Look at the Plugin Announcements forum post about PIA 2.2-beta. That patch will fix the Invalid PHP_SELF.

TheWitness
eterzella.r.t wrote:When i run php check-uptime.php this error occurred:

root@svr1:/var/www/cacti_original/plugins/uptime# php check-uptime.php

Invalid PHP_SELF Path

Cacti Version - 0.8.7b
Plugin Architecture - 2.0
Poller Type - CMD.php
Server Info - Linux 2.6.17-10-server
Web Server - Apache/2.0.55 (Ubuntu) PHP/5.1.6
PHP - 5.1.6
PHP Extensions - xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, standard, SimpleXML, sockets, soap, SPL, shmop, session, Reflection, posix, mime_magic, mbstring, iconv, hash, gettext, ftp, filepro, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, mysql, snmp, mysqli, gd
MySQL - 5.0.24a-Debian_9-log
RRDTool - 1.2.23
SNMP - 5.2.2
Plugins
  • Global Plugin Settings (settings - v0.3)
    Thresholds (thold - v0.3.9)
    Network Discovery (discovery - v0.8.3)
    Device Monitoring (monitor - v0.8.2)
    Host Info (hostinfo - v0.2)
    Network Tools (tools - v0.2)
    Device Tracking (mactrack - v1.1)
    FlowView (flowview - v0.4)
    Uptime (uptime - v0.3)
    PHP Network Weathermap (weathermap - v0.95a)
    ReportIt (ReportIt - v0.5.1)
    Report Creator (reports - v0.3)
    Network Management Inventory Database (nmid - v0.3.7g)
    Poller Performance Report (pollperf - v0.32)
    NMID SmokePing Plugin (nmid_smokeping - v0.1)
    NMID NFTracker Plugin (nmid_nftracker - v0.1)
    NMID WebService Plugin (nmid_webservice - v0.1)
    NMID CiscoWorks Plugin (nmid_ciscoworks - v0.1)
    NMID phpIP Plugin (nmidPhpip - v0.3.8a)
    NMID TaskManager Plugin (nmidTaskManager - v0.3.8a)
    IP subnet Calculator IPv4 IPv6 (ipsubnet - v.4d)
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
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

updated to PA 2.1
MadX
Posts: 31
Joined: Wed Apr 23, 2008 7:10 pm

Post by MadX »

For me this is the only one that worked uptime-hj.zip after applying your check-uptime.php changes.

cacti Version 0.8.7b Beta installer for windows
PA 2.1
Apache 2.0
Diablork
Posts: 1
Joined: Sat Jun 07, 2008 5:40 pm

Post by Diablork »

Hi Gilles ! First, big thanks for this plugin !
Second, I had an issue with it ... After install the plugin and patched the host.php file I got an error at line 1291 in browser ! After I commented out this :

Code: Select all

<?php
//gilles 1
?>
everything is fine and working ...
Is that something u've missed or ... ?!
benton2006
Cacti User
Posts: 50
Joined: Sun Apr 01, 2007 12:47 am

Post by benton2006 »

yes , I met the same issue . so I had to use primary file
[quote][b]Cacti Version[/b] - 0.8.7b
[b]Plugin Architecture[/b] - 2.1
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.9-55.ELsmp
[b]Web Server[/b] - Apache/2.2.6 (Unix) PHP/5.2.5RC1
[b]PHP[/b] - 5.2.5RC1
[b]PHP Extensions[/b] - xmlwriter, libxml, dom, xmlreader, xml, tokenizer, session, pcre, SimpleXML, SPL, PDO, sockets, snmp, SQLite, standard, Reflection, posix, pdo_sqlite, mysql, ldap, json, iconv, hash, filter, date, ctype, openssl, apache2handler
[b]MySQL[/b] - 5.0.41
[b]RRDTool[/b] - 1.0.50
[b]SNMP[/b] - 5.3.1
[b]Plugins[/b][list]PHP Network Managing (PHP Network Managing - v0.6)
Host Info (hostinfo - v0.2)
Network Tools (tools - v0.2)
Thresholds (thold - v0.3.9)
Device Monitoring (monitor - v0.8.2)
RRD File Cleaner (RRD Cleaner - v0.35)
Create Aggregate Graphs (aggregate - v0.65)
Global Plugin Settings (settings - v0.5)
uptime
WMI Query (wmi - v0.1)[/list][/quote]
leonardo_gyn
Cacti User
Posts: 85
Joined: Sat Jan 22, 2005 4:51 pm

Post by leonardo_gyn »

i have translated some messages sent on the notification message, but the idea stays the same, i havent changed the plugin 'logic'. I'm getting some false positive on reboots, like:
Data: 12/6/2008 19:41
Subject: Reboot detectado

Host : 10.255.96.2 (Carapicuíba - AD Logon)
Uptime antigo: 3169780143 (366.9 dias)
Uptime novo : 1605109451 (185.8 dias)
Motivo:

as i also have a graph that shows machine uptime, i'm completly sure that the information was correctly provided by the machine on that moments before and after the gap that triggered the reboot notification.
06/12/2008 07:35:30 PM - SPINE: Poller[0] Host[95] DS[1706] SNMP: v1: 10.255.96.2, dsname: host_uptime_win, oid: .1.3.6.1.2.1.1.3.0, value: 1605072326
06/12/2008 07:40:23 PM - SPINE: Poller[0] Host[95] DS[1706] SNMP: v1: 10.255.96.2, dsname: host_uptime_win, oid: .1.3.6.1.2.1.1.3.0, value: 1605101634
06/12/2008 07:45:43 PM - SPINE: Poller[0] Host[95] DS[1706] SNMP: v1: 10.255.96.2, dsname: host_uptime_win, oid: .1.3.6.1.2.1.1.3.0, value: 1605133643

do you have any idea why this false reboot notification was triggered ??
sander815
Posts: 13
Joined: Tue Aug 17, 2004 2:30 am

Post by sander815 »

i added uptime to my plugins, but i don't see any device in the uptime tab
what went wrong?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

sander815 wrote:i added uptime to my plugins, but i don't see any device in the uptime tab
what went wrong?
Nothing. You need to go into the Devices and check the 'monitor uptime' box.

The Uptime tab shows the detected reboot events, so if nothing has rebooted yet, it will be empty.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
sander815
Posts: 13
Joined: Tue Aug 17, 2004 2:30 am

Post by sander815 »

ok, i already checked them
so once rebooted they will show up?
cristiv
Posts: 9
Joined: Thu Aug 14, 2008 5:33 am

thanks!

Post by cristiv »

hey gilles,
I just wanted to say to you a big thanks for this plugin.
I installed it simply flawless in cacti 0.8.7b using the Plugin Management.
Everything went perfect and I had uptime running in a minute!
Many thanks again! and keep up with the good work.
Chris
apperrault
Cacti User
Posts: 379
Joined: Fri Feb 16, 2007 11:37 am
Location: Emeryville, CA
Contact:

Post by apperrault »

I think that there is some sort of problem with the Uptime plugin, and the discovery plugin. When I install the Uptime plugin, i lose the ability to set the options for the discovery plugin. when i disable Uptime, i can set all of the options for the Discovery plugin, but when the uptime plugin is enabled, i lose those fields on the settings/misc page. The uptime plugin i downloaded from this thread, and the discovery plugin i got from the SVN.

I figured i would let everyone know.

app
[b]Cacti Version[/b] - 0.8.7b
[b]Plugin Architecture[/b] - 2.2 Beta
[b]Poller Type[/b] - CMD.php
[b]Server Info[/b] - Linux 2.6.9-78.0.1.ELsmp
[b]Web Server[/b] - Apache/2.0.52 (Red Hat)
[b]PHP[/b] - 4.3.9
[b]MySQL[/b] - 4.1.22
[b]RRDTool[/b] - 1.2.23
[b]SNMP[/b] - 5.1.2
[b]Plugins[/b][list]Global Plugin Settings (settings - v0.5)
SuperLinks (superlinks - v0.72)
Host Info (hostinfo - v0.2)
Report Creator (reports - v0.3)
Update Checker (update - v0.4)
Realtime for Cacti (realtime - v0.35)
Cacti Log View (clog - v1.1)
RRD File Cleaner (rrdclean - v0.36)
Network Discovery (discovery - v0.9)
Uptime (uptime - v0.4)[/list]
jwilda
Posts: 7
Joined: Wed Oct 22, 2008 10:32 am
Location: Tampa, FL

is there any quick way to enable this on a bunch of devices?

Post by jwilda »

Is there anyway to enable the uptime check to say 100 devices?
apperrault
Cacti User
Posts: 379
Joined: Fri Feb 16, 2007 11:37 am
Location: Emeryville, CA
Contact:

Post by apperrault »

I manually went into the MySQL DB and ran the following command. It worked like a charm.

Code: Select all

 UPDATE `cacti`.`host` SET `uptime` = 'on' 
and now all of my devices have the Check Uptime box checked.

app
[b]Cacti Version[/b] - 0.8.7b
[b]Plugin Architecture[/b] - 2.2 Beta
[b]Poller Type[/b] - CMD.php
[b]Server Info[/b] - Linux 2.6.9-78.0.1.ELsmp
[b]Web Server[/b] - Apache/2.0.52 (Red Hat)
[b]PHP[/b] - 4.3.9
[b]MySQL[/b] - 4.1.22
[b]RRDTool[/b] - 1.2.23
[b]SNMP[/b] - 5.1.2
[b]Plugins[/b][list]Global Plugin Settings (settings - v0.5)
SuperLinks (superlinks - v0.72)
Host Info (hostinfo - v0.2)
Report Creator (reports - v0.3)
Update Checker (update - v0.4)
Realtime for Cacti (realtime - v0.35)
Cacti Log View (clog - v1.1)
RRD File Cleaner (rrdclean - v0.36)
Network Discovery (discovery - v0.9)
Uptime (uptime - v0.4)[/list]
jwilda
Posts: 7
Joined: Wed Oct 22, 2008 10:32 am
Location: Tampa, FL

uptime colume on devices page isn't accurate

Post by jwilda »

the uptime column on the devices page is not correct. Does anyone know why and how to fix it.
i.e.
device page uptime column shows:
1d 2h 12m
system shows:
13:55:55 up 67 days, 9:29
uptime graph shows:
Days: 67 Hours: 9 Minutes: 23
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

The uptime column on the devices page is just how long since the device last missed a poll, I'm pretty sure - it's not related to the actual uptime (often - things miss a ping).
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests