ssh and output

Lena M lena__m at hotmail.com
Thu Aug 28 17:46:54 CEST 2003


Hello, All,

My name is Lena, and I'm new to the list.

I'm having a problem with nagios displaying output of the commands it runs over ssh. I hope you can help me solve it.

For instance, when I run the following from a command prompt of my monitoring host, I get an output:
-bash-2.05b$  /usr/bin/ssh redhat1  /usr/local/nagios/check_disk -w 3 -c 1 /dev/hda1

DISK OK [1058016 kB (20%) free on /dev/hda1]

However, nagios displays "Current Status: Unknown" and "Status information: No output!" in its web page when it runs the same command.

I tried using different ssh commands but..the same result. Both hosts have redhat 8.0 and nagios 1.1 installed. Your help will be greatly appreciated.

Here is configuration info from nagios files:

checkcommands.cfg

define command{

        command_name    ssh-2check-users

        command_line    /usr/bin/ssh redhat1 /usr/local/nagios/check_users -w 3 -c 1

        }

services.cfg

define service{

        use                             generic-service         ; Name of service template to use



        host_name                       redhat1

        service_description             FREE DISK SPACE

        is_volatile                     0

        check_period                    24x7

        max_check_attempts              3

        normal_check_interval           5

        retry_check_interval            2

        contact_groups                  redhat-admins

        notification_interval           240

        notification_period             24x7

        notification_options            w,u,c,r

        check_command                   ssh-2check-disk!80%!90%!/dev/hda1



Web Output:

Service State Information

                  Current Status:
                   UNKNOWN    
                 
                  Status Information:
                 (No output!)
                 
                  Current Attempt:
                 3/3
                 
                  State Type:
                 HARD
                 
                  Last Check Type:
                 ACTIVE
                 
                  Last Check Time:
                 08-28-2003 11:16:23
                 
                  Status Data Age:
                 0d 0h 0m 32s
                 
                  Next Scheduled Active Check:  
                 08-28-2003 11:21:23
                 
                  Latency:
                 < 1 second
                 
                  Check Duration:
                 1 second
                 
                  Last State Change:
                 08-28-2003 10:43:52
                 
                  Current State Duration:
                 0d 0h 33m 3s
                 
                  Last Service Notification:
                 08-28-2003 10:43:52
                 
                  Current Notification Number:
                 1
                 
                  Is This Service Flapping?
                 N/A
                 
                  Percent State Change:
                 N/A
                 
                  In Scheduled Downtime?
                   NO  
                 
                  Last Update:
                 08-28-2003 11:16:43
                 

           

     
                  Service Checks:
                   ENABLED  
                 
                  Passive Checks:
                   ENABLED  
                 
                  Service Notifications:
                   ENABLED  
                 
                  Event Handler:
                   ENABLED  
                 
                  Flap Detection:
                   ENABLED  
                 

           






     


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030828/1ac77cd6/attachment.html>


More information about the Users mailing list