mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-24 22:24:44 +02:00
parent
cd05686a70
commit
3b04b4dcf5
10
test/jenkins/external_commandpipe.test
Executable file
10
test/jenkins/external_commandpipe.test
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -e "/var/run/icinga2/cmd/icinga2.cmd" ];
|
||||||
|
then
|
||||||
|
echo "Icinga2 commandpipe found"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Icinga2 commandpipe not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
17
test/jenkins/livestatus_socket.test
Executable file
17
test/jenkins/livestatus_socket.test
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ ! -e /var/run/icinga2/cmd/livestatus ];
|
||||||
|
then
|
||||||
|
sudo icinga2-enable-feature livestatus 1> /dev/null
|
||||||
|
sudo service icinga2 restart 1> /dev/null
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
if [ ! -e /var/run/icinga2/cmd/livestatus ];
|
||||||
|
then
|
||||||
|
echo "Icinga2 Livestatus socket not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Icinga2 Livestatus socket found"
|
||||||
|
exit 0
|
10
test/jenkins/logfile.test
Executable file
10
test/jenkins/logfile.test
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if sudo test -f /var/log/icinga2/icinga2.log;
|
||||||
|
then
|
||||||
|
echo "Icinga2 log file found"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Icinga2 log file not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
10
test/jenkins/pidfile.test
Executable file
10
test/jenkins/pidfile.test
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -f /var/run/icinga2/icinga2.pid ];
|
||||||
|
then
|
||||||
|
echo "Icinga2 pidfile found"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Icinga2 pidfile not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
37
test/jenkins/statusdata.test
Executable file
37
test/jenkins/statusdata.test
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ ! -f /var/cache/icinga2/status.dat ];
|
||||||
|
then
|
||||||
|
sudo icinga2-enable-feature statusdata 1> /dev/null
|
||||||
|
sudo service icinga2 restart 1> /dev/null
|
||||||
|
|
||||||
|
n=0
|
||||||
|
while [ $n -lt 3 ]
|
||||||
|
do
|
||||||
|
sleep 15
|
||||||
|
|
||||||
|
if [ -f /var/cache/icinga2/status.dat ];
|
||||||
|
then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
|
n=$(( $n + 1))
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $n -eq 3 ];
|
||||||
|
then
|
||||||
|
echo "Icinga2 status.dat not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Icinga2 status.dat found"
|
||||||
|
|
||||||
|
if [ -f /var/cache/icinga2/objects.cache ];
|
||||||
|
then
|
||||||
|
echo "Icinga2 objects.cache found"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Icinga2 objects.cache not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user