In the NRPE charmed application, several configuration filenames are written with a '-' (dash) where only '_' (underscore) are expected.
This situation is seen independently of the deployed charmed.
No error is raised within the COS in the vast majority of the cases
Example:
List nrpe checks
juju run nrpe/23 list-nrpe-checks
Running operation 8541 with 1 task
In the NRPE charmed application, several configuration filenames are written with a '-' (dash) where only '_' (underscore) are expected. This situation is seen independently of the deployed charmed. No error is raised within the COS in the vast majority of the cases
Example:
List nrpe checks
juju run nrpe/23 list-nrpe-checks Running operation 8541 with 1 task
Waiting for task 8542... checks: check-apache2: /usr/local/lib/nagios/plugins/check_systemd.py apache2 check-cinder-scheduler: /usr/local/lib/nagios/plugins/check_systemd.py cinder-scheduler check-conntrack: /usr/local/lib/nagios/plugins/check_conntrack.sh -w 80 -c 90 check-corosync-proc: /usr/lib/nagios/plugins/check_procs -c 1:1 -C corosync check-crm-status: /usr/local/lib/nagios/plugins/check_crm -s --failedactions=ignore --failcount-warn=3 --failcount-crit=10 check-haproxy: /usr/local/lib/nagios/plugins/check_systemd.py haproxy check-haproxy-queue: /usr/local/lib/nagios/plugins/check_haproxy_queue_depth.sh check-haproxy-servers: /usr/local/lib/nagios/plugins/check_haproxy.sh check-memcached: /usr/local/lib/nagios/plugins/check_systemd.py memcached check-pacemakerd-proc: /usr/lib/nagios/plugins/check_procs -c 1:1 -C pacemakerd check-reboot: /usr/local/lib/nagios/plugins/check_reboot.py "2024-09-09 01:42:23" check-systemd-scopes: /usr/local/lib/nagios/plugins/check_systemd_scopes.py -e 25 -E 50 -a 25 -A 25 check-telegraf-http: /usr/lib/nagios/plugins/check_http -I 127.0.0.1 -p 9103 -u /metrics timestamp: Tue Nov 19 13:43:16 UTC 2024
Run a check
juju run nrpe/23 run-nrpe-check name="check-cinder-scheduler" Running operation 8543 with 1 task
Waiting for task 8544... Action id 8544 failed: /etc/nagios/nrpe.d/check_cinder_scheduler.cfg does not exist or the check failed
List configuration files
$ juju ssh nrpe/23
$ cd /etc/nagios/nrpe.d/
$ ls check_apache2.cfg check_conntrack.cfg check_crm_status.cfg check_haproxy_queue.cfg check_memcached.cfg check_reboot.cfg check_telegraf_http.cfg check_cinder-scheduler.cfg check_corosync_proc.cfg check_haproxy.cfg check_haproxy_servers.cfg check_pacemakerd_proc.cfg check_systemd_scopes.cfg
Change the configuration file to all underscore
$ sudo cp check_cinder-scheduler.cfg check_cinder-scheduler.cfg_orig $ sudo mv check_cinder-scheduler.cfg check_cinder_scheduler.cfg
Rerun the NRPE check
juju run nrpe/23 run-nrpe-check name="check-cinder-scheduler" Running operation 8545 with 1 task
Waiting for task 8546... check-output: 'OK: cinder-scheduler.service is running'