mirror of
https://github.com/FAUSheppy/monitoring-tools
synced 2025-12-06 03:21:35 +01:00
implement source plugin check
This commit is contained in:
20
check_source_plugins.sh
Executable file
20
check_source_plugins.sh
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
PLUGIN_NAME=Skillbird
|
||||||
|
|
||||||
|
/usr/local/bin/insurgency_rcon sm plugins list Skillbird | grep $PLUGIN_NAME &>/dev/null
|
||||||
|
ins01=$?
|
||||||
|
/usr/local/bin/insurgency_small_rcon sm plugins list Skillbird | grep $PLUGIN_NAME &>/dev/null
|
||||||
|
ins02=$?
|
||||||
|
|
||||||
|
if [ "$ins01" -ne "0" ]; then
|
||||||
|
echo "Plugin not loaded!? (ins01)"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$ins02" -ne "0" ]; then
|
||||||
|
echo "Plugin not loaded!? (ins02)"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Plugin Loaded"
|
||||||
|
exit 0
|
||||||
@@ -5,3 +5,7 @@ object CheckCommand "source-server" {
|
|||||||
"-p" = "$port$"
|
"-p" = "$port$"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object CheckCommand "source-plugins" {
|
||||||
|
command = [ "/etc/icinga2/monitoring-tools/check_source_plugins.sh" ]
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user