Cacti / plugin_monitor

Monitor Plugin for Cacti
GNU General Public License v2.0
36 stars 39 forks source link

Monitor plugin emails show previous uptime 2m for any device regardless of actual uptime. #159

Closed sgvfr closed 3 months ago

sgvfr commented 8 months ago

perhaps I am doing something wrong here, but the previous uptime is wrong for any device reported down by the monitor plugin.

Describe the bug Any device, when reported as "down" show a previous uptime of 2m regardless of actual previous uptime.

cacti: b2f3403fc (HEAD -> develop, origin/develop, origin/HEAD) QA: Modify confirmation API to add header and footer plugin_monitor: e3d4eb5 (HEAD -> develop, origin/develop, origin/HEAD) Update translation files

PHP 8.1.25 (cli) (built: Oct 27 2023 14:00:40) (NTS)

To Reproduce Steps to reproduce the behavior:

  1. Monitor a device for 1 hr using plugin_monitor, ping only for uptime check
  2. change IP, or unplug.. cause an outage somehow.
  3. Email received shows previous uptime of 2m no matter what the actual previous uptime was.

Expected behavior

Email should show the correct previous uptime

Changed IP address to simulate outage

System Error : - TEST 4RF radio (192.168.0.130) is DOWN
Site: Unspecified
Location: 
Reason: ICMP: Ping timed out
Average system response: ms
System availability: 99.98 %
Total Checks Since Clear: 8599
Total Failed Checks: 2
Last Date Checked DOWN : 2023-11-14 09:38:13
Device Previously UP for: 2m

Changed back to simulate return to service, and shows the correct downtime.

System - TEST 4RF radio (192.168.50.130) status: UP

System - TEST 4RF radio (192.168.50.130) status: UP
Site: Unspecified
Location: 
Current ping response: 0.91 ms
Average system response: ms
System availability: 99.92 %
Total Checks Since Clear: 8,607
Total Failed Checks: 7
Last Date Checked UP: 2023-11-14 09:38:13
Device Previously DOWN for: 9m 13s

Snmp Info:
Name - TEST
Location - TEST
Uptime - 208d 15h 33m (1802723000 ms)
System - AprisaXE - 4RF Communications Ltd.

image

TheWitness commented 8 months ago

So, this is likely a fundamental cacti issue. Cacti loads that mib data into the device/host table, and for some reason it did not during the recovery.

What version of cacti? Spine or cmd.php?

sgvfr commented 8 months ago

Sorry for reporting so many things lol.
All the newest pulls, from the devel branch for both cacti, and plugin_monitor

SPINE 1.3.0

systemctl status cactid.service ● cactid.service - Cacti Daemon Main Poller Service Loaded: loaded (/etc/systemd/system/cactid.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2023-11-09 10:10:09 PST; 6 days ago Main PID: 1253 (php) Tasks: 2 (limit: 4494) Memory: 515.2M CPU: 10h 59min 4.969s CGroup: /system.slice/cactid.service ├─ 1253 php /var/www/html/cacti/cactid.php └─2620580 /usr/bin/php -q /var/www/html/cacti/poller.php --force

TheWitness commented 7 months ago

Checkout the fix for #161 and see if it's applicable.

sgvfr commented 7 months ago

Checkout the fix for #161 and see if it's applicable.

Sorry, doesn't seem to fix this one with my latest test.

sgvfr commented 6 months ago

Good morning, any chance this can be looked at again?

xmacan commented 5 months ago

I think that this is thold issue

TheWitness commented 5 months ago

Sorry @sgvfr , lots of issues on the home front. My vain attempt to restart Cacti work collided with hospitals, funeral homes and general chaos.

Going to take me a little more time before I'm back to a normal schedule. I'm fine, it everyone else around me struggling though.

sgvfr commented 5 months ago

@TheWitness no apologies or explanation needed. Take whatever time you need for your family.

sgvfr commented 4 months ago

shameful bump. Hope things have gotten easier for your family.

TheWitness commented 4 months ago

I'm here. Hope to back at again this week. Weekend was a loss, but not a total loss. More hospital time sadly. Lots of fun. We are next. Hopefully not for another 30 years.

xmacan commented 4 months ago

@TheWitness - it seems that I will have time tomorrow. I can look at it

sgvfr commented 4 months ago

Man, if you have family in hospitals, this is the least important thing. Take your time.

xmacan commented 3 months ago

It is fixed in thold plugin