canonical / nrpe_exporter

A Prometheus exporter for generating metrics from commands executed by a running NRPE daemon.
Apache License 2.0
48 stars 18 forks source link

Check_command with ARGS is giving command_status as 0 #18

Open abhigupta1207 opened 3 years ago

abhigupta1207 commented 3 years ago

I am trying to create a job in prometheus for the below check command in nrpe.cfg.

command[check_test]=/usr/local/bin/check_test.py -i $ARG1$

I am not able to get command_status as 1 for this command. I tried multiple check_commands with $ARG1$ and it seems like NRPE exporter is not able to run the check_commands with dynamic ARGS.

HELP command_duration Length of time the NRPE command took TYPE command_duration gauge command_duration 0.052347708 HELP command_ok Indicates whether or not the command was a success TYPE command_ok gauge command_ok 0 HELP command_status Indicates the status of the command TYPE command_status gauge command_status 3

Kattyi commented 3 years ago

I have the same issue, it would really help to see a command example with $ARG in the documentation.

vigohe commented 4 months ago

It's not supported

https://github.com/canonical/nrpe_exporter/issues/12#issuecomment-614770386