mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
parent
3e5af43e4d
commit
1022adf172
@ -117,6 +117,7 @@ authorize "*" {
|
||||
#
|
||||
hosts = ".*"
|
||||
services = ".*"
|
||||
commands = ".*"
|
||||
}
|
||||
|
||||
#
|
||||
@ -124,4 +125,4 @@ authorize "*" {
|
||||
# "*.conf" files within this directory and all subdirectories are included.
|
||||
#
|
||||
# include(nsca-ng.d/included.cfg)
|
||||
#
|
||||
#
|
||||
|
29
test/jenkins/nsca-ng.test
Executable file
29
test/jenkins/nsca-ng.test
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
pid_before_restart=`ps -U icinga | grep icinga2 | awk '{print $1}'`
|
||||
echo 'RESTART_PROCESS' | sudo send_nsca -C
|
||||
sleep 3
|
||||
pid_after_restart=`ps -U icinga | grep icinga2 | awk '{print $1}'`
|
||||
|
||||
if [ $pid_after_restart -eq $pid_before_restart ]; then
|
||||
echo "Failed to send 'RESTART_PROCESS' to icinga2"
|
||||
exit 1
|
||||
else
|
||||
echo "Successfully sent 'RESTART_PROCESS' to icinga2"
|
||||
fi
|
||||
|
||||
printf "localhost\t0\tA passive result returning OK\n" | sudo send_nsca
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "Failed to send passive check result for host 'localhost'"
|
||||
exit 1
|
||||
else
|
||||
echo "Successfully sent a passive check result for host 'localhost'"
|
||||
fi
|
||||
|
||||
printf "localhost\tdisk\t2\tA passive result not returning OK\n" | sudo send_nsca
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "Failed to send passive check result for service 'disk' on host 'localhost'"
|
||||
exit 1
|
||||
else
|
||||
echo "Successfully sent a passive check result for service 'disk' on host 'localhost'"
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user