Is there a list of parameters that can be passed with the actions component. At the moment I'm only passing %host % in this command:
Code: Select all
/usr/local/nagios/libexec/naf_install_nscp_0.4.1.101.sh "%host%" wingateway.fqdnGrtz
Willem
Code: Select all
/usr/local/nagios/libexec/naf_install_nscp_0.4.1.101.sh "%host%" wingateway.fqdnCode: Select all
#!/bin/bash
# Script name: dig_create_infra_call.sh
# Version: 0.14.8.13
# Author: Willem D'Haese
# Created on: 13/08/2014
# Purpose: Quick action bash script that will call a Powershell script through nrpe to create an Infra call
# To do: Everything
# History:
# 15/12/2013 => Creation date
# Copyright:
# This program is free software: you can redistribute it and/or modify it under the terms of the
# GNU General Public License as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.You should have received a copy of the GNU
# General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
# Passed parameters
HOST=$1
SERVICE=$2
SERVICESTATETYPE=$3
SERVICESTATUSTEXT=$4
SERVICESTATUSTEXTLONG=$5
SERVICELASTCHECK=$6
# Logfile
LOGFILE=/var/log/dig_create_infra_call.log
GATEWAY=gatewayserver
NOW=$(date '+%Y-%m-%d -- %H:%M:%S')
echo "$NOW : Infra call creatin initiated." >> $LOGFILE
echo "Parameters => Host : $HOST , Service : $SERVICE , Servicestatetype : $SERVICESTATETYPE" >> $LOGFILE
echo "Parameters => Servicestatustext : $SERVICESTATUSTEXT" >> $LOGFILE
echo "Parameters => Servicestatustextlong : $SERVICESTATUSTEXTLONG" >> $LOGFILE
echo "Parameters => Servicelastcheck : $SERVICELASTCHECK" >> $LOGFILE
/usr/local/nagios/libexec/check_nrpe -H $GATEWAY -t 300 -c dig_create_infra_call -a $HOSTNAME
echo "$NOW : Infra call creation finished." >> $LOGFILE
Code: Select all
2014-08-13 -- 17:34:15 : Infra call creatin initiated.
Parameters => Host : hostservername , Service : DRV_C , Servicestatetype : 1
Parameters => Servicestatustextlong :
Parameters => Servicelastcheck : 2014-08-13+17%3A21%3A26
2014-08-13 -- 17:34:15 : Infra call creation finished.
2014-08-13 -- 17:37:16 : Infra call creatin initiated.
Parameters => Host : hostservername , Service : DRV_C , Servicestatetype : 1
Parameters => Servicestatustext : OK%3A+C%3A%3A+Total%3A+25G+-+Used%3A+21.3G+%2885%25%29+-+Free%3A+3.66G+%2815%25%29
Parameters => Servicestatustextlong :
Parameters => Servicelastcheck : 2014-08-13+17%3A36%3A26
2014-08-13 -- 17:37:16 : Infra call creation finished.