Fw: Fw: Fw: nagios alerts to pc

Dhaval Thakar dpthakar at hotmail.com
Tue Jan 9 16:14:58 CET 2007


contact config
################################################################################
define contact{
        contact_name                    nagios-bsupport
        alias                           Nagios bsupport
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,r
        service_notification_commands   notify-by-email
        host_notification_commands      host-notify-by-email
        email                           bsupport at domain.com
        address1                        dhaval
        address2                        192.168.10.5
        }

define contactgroup{
        contactgroup_name       fw
        alias                   Administrators
        members                 nagios-fw
        }



Host config
################################################################################
#BackFW
define host{
        use                     generic-host            ; Name of host template to use
        host_name               BackFW
        alias                   BackFW
        address                 172.20.20.7
        check_command           check-host-alive
        max_check_attempts      10
        check_period            24x7
        notification_interval   120
        notification_period     24x7
        notification_options    d,r
        contact_groups  fw
        }

#ping
define service{
        use                             generic-service         ; Name of service template to use
        host_name                       BackFW
        service_description             PING
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              4
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  fw
        notification_options            w,u,c,r
        notification_interval           960
        notification_period             24x7
        check_command                   check_ping!100.0,20%!500.0,60%
        }


service config
################################################################################
# 'service-notify-by-smbclient' command definition
define command{
        command_name    notify-by-smbclient
        command_line    /bin/echo '$SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$' | /usr/bin/sm
bclient -M $CONTACTADDRESS1$  -I $CONTACTADDRESS2$ -U NAGIOS >> /tmp/smbconfig.log
        }













----- Original Message ----- 
From: "Andy Shellam (Mailing Lists)" <andy.shellam-lists at mailnetwork.co.uk>
To: "Dhaval Thakar" <dpthakar at hotmail.com>
Cc: <nagios-users at lists.sourceforge.net>
Sent: Tuesday, January 09, 2007 8:00 PM
Subject: Re: [Nagios-users] Fw: Fw: nagios alerts to pc


> Post your configuration for the service, host, command and contact in 
> question - we're just stabbing in the dark without it.
> 
> Andy.
> 
> Dhaval Thakar wrote:
>> Andy,
>>
>> Same command (smbclient -M adminmachine -I adminip) I checked with nagios
>> user, it is working.
>>
>> I created "/tmp/smbclient.log" file with nagios user, but still there is no 
>> input in the file
>>
>> ----- Original Message ----- 
>> From: "Andy Shellam (Mailing Lists)" <andy.shellam-lists at mailnetwork.co.uk>
>> To: "Dhaval Thakar" <dpthakar at hotmail.com>; "Nagios Users mailinglist"
>> <nagios-users at lists.sourceforge.net>
>> Sent: Tuesday, January 09, 2007 7:04 PM
>> Subject: Re: [Nagios-users] Fw: nagios alerts to pc
>>
>>
>>   
>>> Dhaval Thakar wrote:
>>>     
>>>> the reason to redirect to logs was to ensure execution of the command,
>>>> but log is not created. i tried with mentioned command from shell using
>>>> root. it is working hence communication to windows machine is ok.
>>>>       
>>> There could be your problem - test the plugin running as the "nagios"
>>> user.
>>>     
>>>> i have not created file "/tmp/smbclient.log", just mentioned in
>>>> commands.cfg
>>>> nagios user has the rights to write to /tmp dir
>>>>       
>>> Don't forget to copy the list in on your replies as it could help somebody
>>> else in the future when searching the archives.
>>>
>>>
>>> Andy.
>>>
>>>     
>>
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share your
>> opinions on IT & business topics through brief surveys - and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Nagios-users mailing list
>> Nagios-users at 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
>>
>> !DSPAM:37,45a3a3b9137101955318944!
>>
>>
>>   
> 
> 
> -- 
> Andy Shellam
> NetServe Support Team
> 
> the Mail Network
> "an alternative in a standardised world"
> 
> p: +44 (0) 121 288 0832/0839
> m: +44 (0) 7818 000834
> 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070109/626f29a6/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at 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


More information about the Users mailing list