Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
xmacan opened this issue Apr 14, 2024 · 13 comments
Closed
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Milestone

Comments

@xmacan
Copy link
Member

xmacan commented Apr 14, 2024

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

@xmacan xmacan added bug Undesired behaviour unverified Some days we don't have a clue labels Apr 14, 2024
@TheWitness
Copy link
Member

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

@bmfmancini
Copy link
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

@bmfmancini
Copy link
Member

bmfmancini commented Apr 14, 2024

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)

@TheWitness
Copy link
Member

Weird. It's more a thold issue IMHO.

@bmfmancini
Copy link
Member

bmfmancini commented Apr 14, 2024 via email

@TheWitness
Copy link
Member

I just fixed thold for this issue.

@TheWitness
Copy link
Member

I've fixed this in the thold plugin.

@xmacan
Copy link
Member Author

xmacan commented Apr 14, 2024

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

@xmacan xmacan reopened this Apr 14, 2024
@TheWitness
Copy link
Member

That is correct. But I corrected it in Thold.

@TheWitness TheWitness 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 Apr 14, 2024
@TheWitness TheWitness added confirmed Bug is confirm by dev team and removed unverified Some days we don't have a clue labels Apr 14, 2024
@TheWitness TheWitness added this to the 1.2.27 milestone Apr 14, 2024
@TheWitness
Copy link
Member

Okay fixing shortly. Great catch.

TheWitness added a commit that referenced this issue Apr 14, 2024
Incorrect values status_fail_date and status_rec_date with cmd poller
@TheWitness TheWitness added the resolved A fixed issue label Apr 14, 2024
@bmfmancini
Copy link
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)

TheWitness added a commit that referenced this issue Apr 15, 2024
Incorrect values status_fail_date and status_rec_date with cmd poller
@shigekobeasley
Copy link

What is the payout and how do I get the balance of the money

@TheWitness
Copy link
Member

If we only had it to begin with.

@netniV netniV 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 Apr 28, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

4 participants