Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

time-host - threshold not working #50

Closed
mathieuchateau opened this issue Nov 18, 2017 · 3 comments
Closed

time-host - threshold not working #50

mathieuchateau opened this issue Nov 18, 2017 · 3 comments
Labels

Comments

@mathieuchateau
Copy link

Hello,

When setting warning and critical time, it's always getting warning and error state

Sample: generate alert while less than a second time shift:

# /usr/lib/nagios/plugins/centreon-plugins/centreon_plugins.pl --plugin=apps::vmware::connector::plugin  --custommode=connector --connector-hostname=127.0.0.1 --verbose --mode time-host --scope-datacenter "MYdatacenter01" --warning-time 60 --critical-time 90
CRITICAL: 'esxi01.mydomain.com' Time offset 0 second(s) : 2017-11-18T14:05:28.044914Z | 'offset'=-0.0449140071868896s;0:60;0:90;0;
'esxi01.mydomain.com' date: 2017-11-18T14:05:28.044914Z, offset: -0.0449140071868896 second(s)

-0.0449140071868896 second is below both threshold of 60 an 90

@Zetun
Copy link

Zetun commented Nov 24, 2017

Hello,

You need to set an interval like this :

--warning-time=-15:15 --critical-time=-30:30

@mathieuchateau
Copy link
Author

@Zetun : Thanks it works
Maybe a good point to update the help message to make format explicit ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants