nbuchwitz / check_pve

Icinga check command for Proxmox VE via API
GNU General Public License v2.0
110 stars 35 forks source link

nrpe Could not fetch data from API: HTTP error code was 500 #27

Closed antonzhelyazkov closed 10 months ago

antonzhelyazkov commented 3 years ago

Hi,

We tried to install your plugin. We use proxmox 7.0-11. Here is our nrpe config

command[check_cpu_pve]=sudo /usr/lib/nagios/plugins/check_pve.py -u monitoring@pve -p <my_secret_pass> -e <api-endpoint> -m cpu -n <node>
command[check_memory_pve]=/usr/lib/nagios/plugins/check_pve.py -u monitoring@pve -p <my_secret_pass> -e <api-endpoint> -m memory -n <node>

When we execute commands in shell we have correct respond. But when we execute command via nrpe we have this respond:

UNKNOWN - Could not fetch data from API: HTTP error code was 500

and this error in syslog

Sep 21 08:46:48 node-05-cloud pvedaemon[159490]: <root@pam> successful auth for user 'monitoring@pve'
Sep 21 08:46:48 node-05-cloud pveproxy[616954]: Use of uninitialized value $path in hash element at /usr/share/perl5/PVE/RPCEnvironment.pm line 123.
Sep 21 08:46:48 node-05-cloud pveproxy[616954]: Use of uninitialized value $path in string eq at /usr/share/perl5/PVE/AccessControl.pm line 1439.
Sep 21 08:46:48 node-05-cloud pveproxy[616954]: Use of uninitialized value $path in hash element at /usr/share/perl5/PVE/RPCEnvironment.pm line 59.
Sep 21 08:46:48 node-05-cloud pveproxy[616954]: Use of uninitialized value $path in hash element at /usr/share/perl5/PVE/RPCEnvironment.pm line 71.
Sep 21 08:46:48 node-05-cloud pveproxy[616954]: Use of uninitialized value $path in hash element at /usr/share/perl5/PVE/RPCEnvironment.pm line 88.

Could you help me to resolve this issue?

nbuchwitz commented 2 years ago

Looks like maybe nrpe is omitting some parts of the command. Do you have any logs of the full command which is run by nrpe (not just the configuration)?

nbuchwitz commented 10 months ago

Closed due to inactivity