[Nagios-users] Check_http
Hi All I have configured Nagios Core in CentOS. I did remotehost(retpro) services of cpu, memory, user, ssh and ping also but unable to config check_http. How to configure remotehost http (url) and Notification Alert (If http down). Pls verify my cfg file in /usr/local/nagios/etc/objects/retpro.cfg define host{ uselinux-server host_name retpro alias retpro address 192.168.1.116 } define service{ use generic-service host_name retpro service_descriptionPING check_command check_ping!100.0,20%!500.0,60% normal_check_interval 5 } define service{ use generic-service host_name retpro service_description Root Partition check_command check_local_disk!20%!10%!/ } define service{ use generic-service host_name retpro service_description SSH check_command check_ssh notifications_enabled 1 } define service{ use generic-service host_name retpro service_descriptionTotal Processes check_command check_local_procs!250!400!RSZDT } define service{ use generic-service host_nameretpro service_description Current Load check_command check_local_load!5.0,4.0,3.0!10.0,6.0/4.0 } Thanks & Regards B.Rajeshkumar 09894943041. -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Question on setting up my own check
Spent some more time with it & now getting a little closer I added this to my script on the dist server running the check: CLOCK=`date +%s` HOST=$1 SVC="Starlite Size" STATUS=$3 OUTPUT=$4 Changed the following lines exit 0 toSTATUS=0 exit 1 toSTATUS=1 exit 2 toSTATUS=2 exit 3 to STATUS=3 the line(s) echo "OK. Free Space: `sudo rsh $1 df -v |grep starlite6 |head -1 | awk '{print $5}'`B, $percent%" to OUTPUT="OK. Free Space: `sudo rsh $1 df -v |grep starlite6 |head -1 | awk '{print $5}'`B, $percent%" running the script manually gives me : [1287522364] PROCESS_SERVICE_CHECK_RESULT;str;Starlite Size;2;Critical. Free Space: 51050B, 2% Up on the central server, I am still getting unknown but a value of null Closer I think but still not there. Does the central server have to have the exact same check script on it or in a passive check, does the central server only care about the results? Thanks, Steve -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Question on setting up my own check
Hello All, I have the following script created to check free space on a remote legacy box via rsh. used=`sudo rsh $1 df -v |grep starlite6 | head -1 | awk '{print $4}'` free=`sudo rsh $1 df -v |grep starlite6 | head -1 | awk '{print $5}'` full=`echo $(($used+$free))` percent=`echo $((( $free * 100 ) / $full))` warn=`echo $((( $full * $2 ) / 100 ))` crit=`echo $((( $full * $3 ) / 100 ))` if [ "$warn" -gt "$crit" -o "$warn" -eq "$crit" ]; then echo "Unknown: [crit] must be larger than [warn]" exit 3 fi if [ "$used" -lt "$warn" -o "$used" -eq "$warn" ]; then echo "OK. Free Space: `sudo rsh $1 df -v |grep starlite6 |head -1 | awk '{print $5}'`B, $percent%" exit 0 elif [ "$used" -gt "$warn" -a "$used" -lt "$crit" ]; then echo "Warning. Free Space: `sudo rsh $1 df -v |grep starlite6 | head -1 | awk '{print $5}'`B, $percent%" exit 1 elif [ "$used" -gt "$crit" ]; then echo "Critical. Free Space: `sudo rsh $1 df -v |grep starlite6 | head -1 | awk '{print $5}'`B, $percent%" exit 2 else echo "Unknown" exit 3 fi If I run this from the command line, I get the following response: /usr/local/nagios/libexec # ./check_starlite_size LEGACYBOX 70 80 Critical. Free Space: 51090B, 2% if nagios runs the script , I keep getting an unknown result on the central server ( distributed environment btw) from nagios.log on central server: [1287511053] PASSIVE SERVICE CHECK: strsa;Starlite Size;3;Unknown I assume that the issue is an incorrect format for the send_nsca file but cant figure out how to set it up correctly. I have the check added on the distributed server & the central server in command.cfg & services.cfg and the check does run so I assume its correct from that aspect, just not an expected format/info .. Can anyone tell me what I am missing here ? Thanks, Steve -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] question about macros
In the past I configured some custom variables to be shown in extinfo, so that they are displayed in objects' details page. So I think it should work. I've no time to test at this moment, but you could :) On Tue, Oct 19, 2010 at 5:10 PM, Paul M. Dubuc wrote: > > Joel Brooks wrote: >> hey gang, >> >> can macros be used in configuration objects? >> >> i.e. can i use $HOSTNAME$ in the display_name directive on a host object? >> > > That would be nice, but I don't think you can. You can use them in the > command arguments in the check_command directive though. > > -- > Download new Adobe(R) Flash(R) Builder(TM) 4 > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly > Flex(R) Builder(TM)) enable the development of rich applications that run > across multiple browsers and platforms. Download your free trials today! > http://p.sf.net/sfu/adobe-dev2dev > ___ > Nagios-users mailing list > Nagios-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-users > ::: Please include Nagios version, plugin version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null > -- Diego Roccia diego.roccia (at) gmail (dot) com -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] question about macros
Joel Brooks wrote: > hey gang, > > can macros be used in configuration objects? > > i.e. can i use $HOSTNAME$ in the display_name directive on a host object? > That would be nice, but I don't think you can. You can use them in the command arguments in the check_command directive though. -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] question about macros
hey gang, can macros be used in configuration objects? i.e. can i use $HOSTNAME$ in the display_name directive on a host object? thx, J -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null