Skip to content

Instantly share code, notes, and snippets.

@lazyfrosch
Last active May 29, 2018 12:13
Show Gist options
  • Save lazyfrosch/a02ccd11ac1e8612f52832228291b710 to your computer and use it in GitHub Desktop.
Save lazyfrosch/a02ccd11ac1e8612f52832228291b710 to your computer and use it in GitHub Desktop.
Wrapper for CheckCommand in Icinga Director
#!/bin/bash
plugin_dir=${0%/*}
vip="$1"
shift
command="$1"
shift
if [ ! "$vip_exists" ]; then
echo "Everything is fine."
exit 0
fi
exec ${plugin_dir}/${command} "$@"
object CheckCommand "vip-disk" {
import "plugin-check-command"
import "disk"
command = [
PluginDir + "/check_vip_app",
"$app_vip$",
"check_disk"
]
}
Command Name: vip-disk
Imports: disk
Command Line: check_vip_app $app_vip$ check_disk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment