rk-it-at / check_rhv

This plugin for Icinga/Nagios is used to monitor a variety of a RHV and oVirt environement including datacenters, clusters, hosts, vms, vm pools and storage domains.
GNU General Public License v3.0
8 stars 10 forks source link

Get an UNKNOWN state for checking the status of a Storagedomain #3

Open HardTy opened 6 years ago

HardTy commented 6 years ago

Hi! We have the following problem on a RHV4.2.5.3 setup:


Command: /usr/lib64/nagios/plugins/check_rhv.pl -H 10.1.1.1 -p 443 -a "monitoring@ldap:password" --storage 'HKG1-1' -l status
Return: RHV UNKNOWN: Storagedomain HKG1-1 not found.

With -vvv:
*after return of the api output*

[D] check_status: Looping through %result
[V] Status: single hash entry found.
[D] check_status: Converting variable $components.
[D] check_status: Converted variable $components: storagedomain
[D] print_notfound: Called function print_notfound.
[D] print_notfound: Input parameter: Storagedomain
[D] print_notfound: Input parameter: HKG1-1
RHV UNKNOWN: Storagedomain HKG1-1 not found.

The old version check_rhev3.pl shows the following:


Old Version Works: /usr/lib64/nagios/plugins/check_rhev3.pl -A '/ovirt-engine/api' -H 10.1.1.1 -p 443 -a "monitoring@ldap:password" --storage 'HKG1-1' -l status
Return: RHEV OK: Storagedomains ok - 1/1 Storagedomains with state UP ,0 Storagedomains in non-critical state|Storagedomains_up=1;1;1;0; non_critical=0;;;0;

With -vvv:
*after return of the api output*

[D] check_status: Looping through %result
[V] Status: single hash entry found.
[D] check_status: Converting variable $components.
[D] check_status: Converted variable $components: storagedomain
Use of uninitialized value in concatenation (.) or string at /usr/lib64/nagios/plugins/check_rhev3.pl line 760.
[V] Status: Result:
[D] check_cstatus: Input parameter $component: storage_domains
[D] check_cstatus: Input parameter: HKG1-1
[D] check_cstatus: Converting variable storage_domains.
[D] check_cstatus: Converted variable $component: storagedomains
[D] eval_status: Called function eval_status.
[D] eval_status: Input parameter $component: Storagedomains
[D] eval_status: Input parameter %input: %input
Use of uninitialized value $input{"HKG1-1"} in concatenation (.) or string at /usr/lib64/nagios/plugins/check_rhev3.pl line 1574.
[V] Eval Status: Status of Storagedomains: .
[V] Eval Status: 1/1 Storagedomains OK
[V] Eval Status: warning value: 1.
[V] Eval Status: critical value: 1.
[V] Eval Status: Performance data: |Storagedomains_up=1;1;1;0; non_critical=0;;;0; .
RHEV OK: Storagedomains ok - 1/1 Storagedomains with state UP [Details: 1 up: HKG1-1],0 Storagedomains in non-critical state|Storagedomains_up=1;1;1;0; non_critical=0;;;0;
scrat14 commented 5 years ago

After reviewing this behavior I dropped -l status for storagedomains, as you can only check status of storagedomain on a datacenter level (-D Default -l storage -s status). Sorry, but this option shouldn't been possible at all.

centrointernet commented 4 years ago

After reviewing this behavior I dropped -l status for storagedomains, as you can only check status of storagedomain on a datacenter level (-D Default -l storage -s status). Sorry, but this option shouldn't been possible at all.

Hi, about this, I have tried use the Datacenter option with (-D Default -l storage -s status), but I have the same error:

RHV UNKNOWN: Unknown data center check is given.