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

apps::vmware::connector::plugin --mode=alarm-datacenter - verbose mode will not show alarm descriptions #5374

Open
joschi99 opened this issue Jan 3, 2025 · 2 comments

Comments

@joschi99
Copy link
Contributor

joschi99 commented Jan 3, 2025

Latest plugin version

The verbose mode will not return the alarm detail but only:
CRITICAL: 1 critical alarm(s) found(s) | 'total_alarm_warning'=0;0:0;;0; 'total_alarm_critical'=1;;0:0;0; 'alarm_warning'=0;;;0; 'alarm_critical'=0;;;0;

The debug mode show the details but
ok: alarm [red] [VirtualMachine] [sp064influx] [2025-01-03T05:59:06.786808Z] Virtual machine CPU usage/Default alarm to monitor virtual machine CPU usage
but it will bring also a lot of debug messages.

Could you update the verbose mode to add the alarm details?

@lucie-dubrunfaut
Copy link
Contributor

Hello :)

Thank for this feedback, can you give us an extended anonymized output with the --debug option set to help us work on this issue easily? I tried to compare with the alarm-host mode (that should work and returns the long output) to try to catch where the long output was lost but it's not easy to find it only reading the code (better to try with realistic data).

@JackTor
Copy link

JackTor commented Feb 11, 2025

Hi,

I have the same problem, in my Centreon with the parameter --verbose show detailed alarm(s), but in the notifications by email or in the timeline of events and logs in GUI just show short output example: CRITICAL: 1 critical alarm(s) found(s). So I can't do a trace or view histsory detail alarms, is like the long output isn't take it with parameter --verbose is used

Verbose
[centreon-engine@centreon~]$ /usr/lib/centreon/plugins/centreon_vmware_connector_client.pl --plugin=apps::vmware::connector::plugin --mode=alarm-datacenter --custommode=connector --connector-hostname='localhost' --connector-port='5700' --container='vcenter' --datacenter='.*' --filter --filter-time='' --warning-status='%{status} =~ /yellow/i' --critical-status='%{status} =~ /red/i' --warning-total-alarm-warning='' --critical-total-alarm-warning='' --warning-total-alarm-critical='' --critical-total-alarm-critical='' --verbose --ignore-warn-msg --filter-time='' --verbose
WARNING: Datacenter 'XXXX' 1 problem(s) detected | 'total_alarm_warning'=1;;;0; 'total_alarm_critical'=0;;;0; 'alarm_warning'=1;;;0; 'alarm_critical'=0;;;0;
checking datacenter 'XXXX'
warning: alarm [yellow] [Datastore] [DISK_XXXXX_X04] [2025-01-28T00:10:01.455947Z] Datastore usage on disk/Default alarm to monitor datastore disk usage
[centreon-engine@opccenbog01 ~]$

Debug
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] HOST: vcenter.xxx.xx, SERVICE: Alarms_1, CHECK TYPE: Active, OPTIONS: 0, RESCHEDULE: Yes, EXITED OK: Yes, EXEC TIME: 0.5
31271, return CODE: 1, OUTPUT: WARNING: Datacenter 'XXXXXX' 1 problem(s) detected | 'total_alarm_warning'=1;;;0; 'total_alarm_critical'=0;;;0; 'alarm_warning'=1;;;0; 'alarm_critical'=0;;;0;
checking datacenter 'XXXXXX'
warning: alarm [yellow] [Datastore] [DISK_XXXX_X04] [2025-01-28T00:10:01.455947Z] Datastore usage on disk/Default alarm to monitor datastore disk usage

[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] Parsing check output Short Output: WARNING: Datacenter 'XXX' 1 problem(s) detected Long Output: checking datacenter 'XXXX'\nwarning: alarm [yellow] [Datastore] [DISK_XXXXX_X04] [2025-01-28T00:10:01.455947Z] Datastore usage on disk/Default alarm to monitor datastore disk usage\n Perf Data: 'total_alarm_warning'=1;;;0; 'total_alarm_critical'=0;;;0; 'alarm_warning'=1;;;0; 'alarm_critical'=0;;;0;
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] now host:vcenter.xxxxx.xxxxserv:Alarms_1 _current_state=1 state_type=HARD
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] ST: HARD CA: 3 MA: 3 CS: 1 LS: 1 LHS: 1
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] Service is in a non-OK state!
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] Host is currently UP, so we'll recheck its state to make sure...
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] * Using last known host state: 0
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] Current/Max Attempt(s): 3/3
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] Service has reached max number of rechecks, so we'll handle the error...
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] Checking service 'Alarms_1' on host 'vcenter.xxx.xxx' for flapping...
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] LFT=25.00, HFT=50.00, CPC=0.00, PSC=0.00%
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] Checking host 'vcenter.xxxx.xxx' for flapping...
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] LFT=25.00, HFT=50, CPC=0, PSC=0%
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] Rescheduling next check of service at Tue Feb 11 00:06:46 2025
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] Scheduling new service check event.
[2025-02-11T00:01:51.009-05:00] [checks] [debug] [2740844] Handling check result for service 80/924...

Image
Image
Image

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

No branches or pull requests

3 participants