c2e27d025c
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2597|2|2595|2|:-1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/303//ansiblelint">Evolix » ansible-roles » unstable #303</a>
gitea/ansible-roles/pipeline/head This commit looks good
18 lines
496 B
Bash
Executable file
18 lines
496 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
if ! test -f /usr/lib/nagios/plugins/check_nrpe; then
|
|
echo '/usr/lib/nagios/plugins/check_nrpe is missing, please install nagios-nrpe-plugin package.'
|
|
exit 1
|
|
fi
|
|
|
|
if [ -r /etc/nagios/nrpe.d/evolix.cfg ]; then
|
|
command=$(grep "\[check_$1\]" /etc/nagios/nrpe.d/evolix.cfg | grep -v '^[[:blank:]]*#' | tail -n1 | cut -d'=' -f2-)
|
|
echo "Command:"
|
|
echo " $command"
|
|
fi
|
|
|
|
echo "NRPE daemon output:"
|
|
/usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1 -c "check_$1"
|
|
|
|
|