Hey,
I've successfully setup the crontab and added an IP. When checking the IP manually it states that the IP is online (which is true). But when refreshing (or just executing the cron manually) the page states that the IP is offline (which is false). See attached screenshots.
Please note that I've correctly set the ping and nmap location, and that - when executing functions/scripts/pingCheck.php - I get no errors.
Please let me know how can I fix this.
Thanks!
Anonymous
Same Happen to me. I dont know how to Fix this
i think the Problem is in /var/www/phpipam/site/ipaddr/ipDetails.php
//calculate
$tDiff = time() - strtotime($ip['lastSeen']);
if($ip['excludePing']=="1" ) { $hStatus = ""; $hTooltip = ""; }
elseif($tDiff < $statuses[0]) { $hStatus = "success"; $hTooltip = ("Device is alive")."
".("Last seen").": ".$ip['lastSeen']; }
elseif($tDiff < $statuses[1]) { $hStatus = "warning"; $hTooltip = ("Device warning")."
".("Last seen").": ".$ip['lastSeen']; }
elseif($tDiff < 2592000) { $hStatus = "error"; $hTooltip = ("Device is offline")."
".("Last seen").": ".$ip['lastSeen'];}
elseif($ip['lastSeen'] == "0000-00-00 00:00:00") { $hStatus = "neutral"; $hTooltip = ("Device is offline")."
".("Last seen").": ".("Never");}
else { $hStatus = "neutral"; $hTooltip = ("Device status unknown");}
Hi, does this happen immediately?
e.g. manual check is ok, than page refresh and is offline?
Hey,
Yes, manual check is ok, than page refresh and is offline. Also I'm
receiving a lot of reports for the IP being online/offline, even if the IP
was 100% online.
I've also checked and it's not a networking/firewall issue, as I've also
added some public IPs (like Google), and the problem is the same.
Please advise.
Thanks!
On Wed, Nov 12, 2014 at 9:30 PM, Miha Petkovsek myha@users.sf.net wrote:
Related
Support Requests:
#105Hi Razvan, so it is either not populating the MySQL field properly or there is something wrong with the code.
Do the following:
- click on one IP address, so thant IP address opens and write down the last number in URL after /ipdetails/. This is the Id of IP address in database.
- run manual check
- check what is stored in db: select
lastSeen
fromipaddresses
whereid
= ID; (replace ID with one from step 1).and let me know if field is properly populated.
brm
Hey Miha,
I've upgraded to the latest rVersion and the issue is partially solved, the
status is stored in the DB.
BUT for some hosts the status is incorrect. When I click "Check
availability" it states the correct info (server offline), but the "dot" in
front of the IP is green, stating "Device is alive" (even if the IP is not
currently added to any server).
Please let me know what information you need from my side in order to fix
this.
Thanks,
Razvan
On Thu, Nov 13, 2014 at 8:55 AM, Miha Petkovsek myha@users.sf.net wrote:
Related
Support Requests:
#105Hi, I still need to see what is stored in db before and after check, please look at my previous post.
same thing happens to me, pre and post upgrade to 1.1. Availability shows offline, though IP status is online. Clicking check availability shows that the IP address is alive, but, the red dot doesn't change to green.
Checking the DB shows the following:
mysql> select lastseen from ipaddresses where id = 3566;
+---------------------+
| lastseen |
+---------------------+
| 2014-12-15 17:53:06 |
+---------------------+
1 row in set (0.00 sec)
Thanks for any help you can provide.
Hi, can you check also system date if it matches?
I was a minute off on the IPAM box, so I mapped to my ntp server and i'm right now.
I ran another ping check and it sees that all the IPs are online, but I still have the red dots by the machine name.
ah, I do see a problem w/ the date in the app. I went to the log page, and it shows the time about 5 hours ahead of the time on the box. How do I adjust the time for the software?
Check that php.ini has the correct timezone set maybe?
Thanks, updated /etc/php5/apache2/php.ini, and the log file now shows the correct time. The alive host issues are still occurring.
That said, it's an amazing program. Thanks very much :). Hope you are enjoying your holidays.
Can you check now what time is reported in DB and compare it to date in console?
So I think guess I need to run the cronjob regularly, as the dot goes green when I do a manual check. The database entry updates correctly:
mysql> select lastseen from ipaddresses where id = 5672;
+---------------------+
| lastseen |
+---------------------+
| 2014-12-24 11:15:01 |
+---------------------+
1 row in set (0.00 sec)
mysql> select lastseen from ipaddresses where id = 5672;
+---------------------+
| lastseen |
+---------------------+
| 2015-01-08 10:38:12 |
+---------------------+
1 row in set (0.00 sec)
mysql>
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Miha, any updates on this problem?
Timezone is set correctly, NTP is in use, database records gets correctly updated (manually and when the script was running).
After some time, the device status change from "alive" to "warning", then to "offline".
When the script runs every 5 minutes, the device status is OK. When the script runs only one or two times a day, the status of the devices is offline.
Why does the status change autmatically to offline?
hi, you can set times in administration > Ping status intervals.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Hi Miha,
great, thank you. I've overlooked this setting, sorry.
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Hello Guys,
My case is even worst, the state change email says: old status=online, new status=online!!!
How this can be possible? :-)
Best,
Ellery
I've posted without login in... I'm the one with online/online status.
Best,
Ellery
Will be fixed in 1.2 due next week.
Tks!
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Still seeing this issue in 1.2
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
[ver1.2]
So far what I have come to understand is that the IP Address list in a subnet does not auto-update. it REQUIRES the cron job to work. [http://phpipam.net/automatic-host-availability-check/]
From testing, the phpIPAM -> ping status intervals settings detail when status change emails are sent. the warning setting does not seem to generate an email, and the offline timeout generates an offline email at it's time interval. I did not see an email stating that the IP had returned to online status.
The cron scheduled scan does not appear to generate email alerts.
-Dean