Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-updates > by-pkgid > 89c3fdeb3510d1b81107cfc380c4506d > files > 8

shinken-2.4.3-2.1.mga7.noarch.rpm

# Here are some sample commands for checking classics things like
# systems and websites


# -----------------------------------------------------------------
#
#      Classic network calls
#
# -----------------------------------------------------------------

# Simple tcp check
define command {
       command_name	check_tcp
       command_line	$PLUGINSDIR$/check_tcp  -H $HOSTADDRESS$ -p $ARG1$
}

# Simple web check
define command {
       command_name	check_http
       command_line	$PLUGINSDIR$/check_http -H $HOSTADDRESS$
}

# And with SSL
define command {
       command_name     check_https
       command_line     $PLUGINSDIR$/check_http -H $HOSTADDRESS$ -S
}

# Check a DNS entry
define command {
       command_name	check_dig
       command_line 	$PLUGINSDIR$/check_dig -H $HOSTADDRESS$ -l $ARG1$
}

# Check a FTP service
define command {
       command_name	check_ftp
       command_line	$PLUGINSDIR$/check_ftp -H $HOSTADDRESS$
}


# Ask a nrpe agent
define command {
       command_name	check_nrpe
       command_line	$PLUGINSDIR$/check_nrpe -H $HOSTADDRESS$ -t 9 -u -c $ARG1$
}

# Same but with arguments
define command {
       command_name	check_nrpe_args
       command_line	$PLUGINSDIR$/check_nrpe -H $HOSTADDRESS$ -t 9 -u -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$ $ARG5$
}

# Simple ping command
define command {
       command_name	check_ping
       command_line	$PLUGINSDIR$/check_ping -H $HOSTADDRESS$ -w 3000,100% -c 5000,100% -p 1
}

# Look at good ssh launch
define command {
       command_name	check_ssh
       command_line	$PLUGINSDIR$/check_ssh -H $HOSTADDRESS$
}

# Look for good smtp connection
define command {
       command_name	check_smtp
       command_line	$PLUGINSDIR$/check_smtp -H $HOSTADDRESS$
}

# And SMTPS too
define command {
       command_name	check_smtps
       command_line	$PLUGINSDIR$/check_smtp -H $HOSTADDRESS$ -S
}

#Pollertag is a advanced features for mix architectures. Look at the doc for it.
define command{
	command_name	check_linux_host_alive
	command_line	$PLUGINSDIR$/check_tcp -H $HOSTADDRESS$ -p 22 -t 3
}

#Pollertag is a advanced features for mix architectures. Look at the doc for it.
define command{
        command_name    check_host_alive
        command_line    $PLUGINSDIR$/check_ping -H $HOSTADDRESS$ -w 1,50% -c 2,70% -p 1
}

define command{
	command_name	check_local_disk
	command_line	$PLUGINSDIR$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
}

define command{
        command_name    check_dummy
        command_line    $USER1$/check_dummy.sh $ARG1$
}

#### Now notification commands
define command{
        command_name                    notify-host-by-email
        command_line                    /usr/bin/printf "%b" "Shinken Notification\n\nType:$NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\nDate/Time: $DATE$" | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}


define command{
        command_name                    notify-service-by-email
        command_line                    /usr/bin/printf "%b" "Shinken Notification\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATE$ Additional Info : $SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}