Menu

#105 Incorrect Online / Offline status

version 0.8
closed
None
5
2022-09-09
2014-10-13
No

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!

2 Attachments

Related

Support Requests: #105

Discussion

1 2 > >> (Page 1 of 2)
  • Anonymous

    Anonymous - 2014-10-23

    Same Happen to me. I dont know how to Fix this

     
  • Anonymous

    Anonymous - 2014-11-05

    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");}

     
  • Miha Petkovsek

    Miha Petkovsek - 2014-11-12

    Hi, does this happen immediately?

    e.g. manual check is ok, than page refresh and is offline?

     
    • Razvan Rosca

      Razvan Rosca - 2014-11-12

      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:

      Hi, does this happen immediately?

      e.g. manual check is ok, than page refresh and is offline?

      Status: open
      Group: version 0.8
      Created: Mon Oct 13, 2014 04:32 PM UTC by Razvan Rosca
      Last Updated: Wed Nov 05, 2014 08:50 AM UTC
      Owner: Miha Petkovsek

      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!

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/phpipam/support-requests/105/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #105

  • Miha Petkovsek

    Miha Petkovsek - 2014-11-13

    Hi 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 from ipaddresses where id = ID; (replace ID with one from step 1).

    and let me know if field is properly populated.

    brm

     
    • Razvan Rosca

      Razvan Rosca - 2014-12-07

      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:

      Hi 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 from ipaddresses where id =
      ID; (replace ID with one from step 1).

      and let me know if field is properly populated.

      brm

      Status: open
      Group: version 0.8
      Created: Mon Oct 13, 2014 04:32 PM UTC by Razvan Rosca
      Last Updated: Wed Nov 12, 2014 07:30 PM UTC
      Owner: Miha Petkovsek

      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!

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/phpipam/support-requests/105/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #105

  • Miha Petkovsek

    Miha Petkovsek - 2014-12-07

    Hi, I still need to see what is stored in db before and after check, please look at my previous post.

     
  • Anonymous

    Anonymous - 2014-12-15

    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.

     
  • Miha Petkovsek

    Miha Petkovsek - 2014-12-24

    Hi, can you check also system date if it matches?

     
  • Anonymous

    Anonymous - 2014-12-24

    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.

     
  • Anonymous

    Anonymous - 2014-12-24

    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?

     
  • Miha Petkovsek

    Miha Petkovsek - 2014-12-24

    Check that php.ini has the correct timezone set maybe?

     
  • Anonymous

    Anonymous - 2014-12-25

    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.

     
  • Miha Petkovsek

    Miha Petkovsek - 2014-12-31

    Can you check now what time is reported in DB and compare it to date in console?

     
  • Anonymous

    Anonymous - 2015-01-08

    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>

     
  • Anonymous

    Anonymous - 2015-07-03

    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?

     
  • Miha Petkovsek

    Miha Petkovsek - 2015-07-03

    hi, you can set times in administration > Ping status intervals.

     
  • Anonymous

    Anonymous - 2015-07-06

    Hi Miha,

    great, thank you. I've overlooked this setting, sorry.

     
  • Anonymous

    Anonymous - 2015-11-26

    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

     
  • Eduardo Ellery

    Eduardo Ellery - 2015-11-26

    I've posted without login in... I'm the one with online/online status.

    Best,
    Ellery

     
  • Miha Petkovsek

    Miha Petkovsek - 2015-11-26

    Will be fixed in 1.2 due next week.

     
  • Eduardo Ellery

    Eduardo Ellery - 2015-11-26

    Tks!

     
  • Miha Petkovsek

    Miha Petkovsek - 2016-02-02
    • Status: open --> closed
     
  • Anonymous

    Anonymous - 2016-04-19

    [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

     
1 2 > >> (Page 1 of 2)

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.