Skip to content

When using CMD poller, Failure and Recovery dates may have incorrect values #5727

Description

@xmacan

If cmd poller is used, status_rec_date and staus_fail_date are around 1970-01-01 (@bmfmancini has 1969, I guess it is timezone/summer time).

New device, snmp works well, device is online:
+---------------------+---------------------+--------------------------------+--------+--------------------+------------------------+ | status_fail_date | status_rec_date | status_last_error | status | status_event_count | snmp_sysUpTimeInstance | +---------------------+---------------------+--------------------------------+--------+--------------------+------------------------+ | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | | 0 | 0 | 0 |

I change snmp port to simulate down state:
| 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | Device did not respond to SNMP | 3 | 1 | 2271887200 |

after few minutes:
| 1970-01-01 01:33:44 | 0000-00-00 00:00:00 | Device did not respond to SNMP | 1 | 1 | 2271887200 |

after recovering:
| 1970-01-01 01:32:50 | 2024-04-14 18:50:00 | Device did not respond to SNMP | 3 | 0 | 2271923200 |

after next poller cycle:
| 1970-01-01 01:32:50 | 1970-01-01 01:33:44 | Device did not respond to SNMP | 3 | 0 | 2271929200 |

@bmfmancini confirmed it. With spine works fine

Activity

  1. added
    bugUndesired behaviour
    unverifiedSome days we don't have a clue
    on Apr 14, 2024
  2. TheWitness commented on Apr 14, 2024

    @TheWitness
    Member

    Yea, he has a messed up sql_mode that does not allow for zero date.

  3. bmfmancini commented on Apr 14, 2024

    @bmfmancini
    Member

    @xmacan and I both have the dame sql mode
    Spine insert all 0's just fine if you swith to cmd that device swaps to 1969

  4. bmfmancini commented on Apr 14, 2024

    @bmfmancini
    Member

    Before swapping to cmd

    MariaDB [cacti]> select hostname,description,status,status_fail_date,status_rec_date from host where description = 'mancinisw' \G
    *************************** 1. row ***************************
    hostname: 192.168.1.253
    description: mancinisw
    status: 1
    status_fail_date: 2024-04-14 12:37:05
    status_rec_date: 2024-04-14 12:30:02
    1 row in set (0.001 sec)

    After

    MariaDB [cacti]> select hostname,description,status,status_fail_date,status_rec_date from host where description = 'mancinisw' \G
    *************************** 1. row ***************************
    hostname: 192.168.1.253
    description: mancinisw
    status: 3
    status_fail_date: 1969-12-31 19:32:49
    status_rec_date: 1969-12-31 19:32:49
    1 row in set (0.001 sec)

  5. TheWitness commented on Apr 14, 2024

    @TheWitness
    Member

    Weird. It's more a thold issue IMHO.

  6. bmfmancini commented on Apr 14, 2024

    @bmfmancini
    Member
  7. TheWitness commented on Apr 14, 2024

    @TheWitness
    Member

    I just fixed thold for this issue.

  8. TheWitness commented on Apr 14, 2024

    @TheWitness
    Member

    I've fixed this in the thold plugin.

  9. xmacan commented on Apr 14, 2024

    @xmacan
    MemberAuthor

    I tested it without thold, it isn't thold issue.

    SQL mode:
    STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

  10. reopened this on Apr 14, 2024
  11. TheWitness commented on Apr 14, 2024

    @TheWitness
    Member

    That is correct. But I corrected it in Thold.

  12. changed the title [-][1.2.27][QA] - incorrect values status_fail_date and status_rec_date with cmd poller[/-] [+]Incorrect values status_fail_date and status_rec_date with cmd poller[/+] on Apr 14, 2024
  13. added
    confirmedBug is confirm by dev team
    and removed
    unverifiedSome days we don't have a clue
    on Apr 14, 2024
  14. added this to the 1.2.27 milestone on Apr 14, 2024
  15. TheWitness commented on Apr 14, 2024

    @TheWitness
    Member

    Okay fixing shortly. Great catch.

  16. added a commit that references this issue on Apr 14, 2024
  17. bmfmancini commented on Apr 14, 2024

    @bmfmancini
    Member

    Yep this is good now

    MariaDB [cacti]> select hostname,description,status,status_fail_date,status_rec_date from host where description = 'mancinisw' \G
    *************************** 1. row ***************************
    hostname: 192.168.1.253
    description: mancinisw
    status: 2
    status_fail_date: 2024-04-14 19:19:05
    status_rec_date: 2024-04-14 19:26:02
    1 row in set (0.001 sec)

  18. added a commit that references this issue on Apr 15, 2024
  19. TheWitness commented on Apr 17, 2024

    @TheWitness
    Member

    If we only had it to begin with.

  20. changed the title [-]Incorrect values status_fail_date and status_rec_date with cmd poller[/-] [+]When using CMD poller, Failure and Recovery dates may have incorrect values[/+] on Apr 28, 2024
  21. locked and limited conversation to collaborators on Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourconfirmedBug is confirm by dev teamresolvedA fixed issuestatus:confirmedNamespaced Cacti workflow labeltype:bugNamespaced Cacti workflow label

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions