[Nagiosplug-devel] How to use my shell script in Nagios

Liu Lantao liulantao at gmail.com
Mon Aug 3 04:50:59 CEST 2009


Hi,

  You should place your monitor.sh into /usr/local/nagios/libexec/ first,
then define the command in the config file,
/usr/local/nagios/etc/object/commands.cfg for example. then you can define
your services using this command.
  the command may like this:
 define command{
        command_name    check-my-monitor
        command_line    $USER1$/monitor.sh $ARG1$
}
and your service may like this:
define service{
        use                             local-service
        host_name                       localhost
        service_description             My-Monitor
        check_command                   check-my-monitor
        }



On Sat, Aug 1, 2009 at 5:13 AM, sunil naik
<sunilnaikwadi04 at indiatimes.com>wrote:

> Dear team
>
>
> Please let us know how i Use my monitor.sh scripts in Nagios plugin
>
>
>
>
> Regards
> Sunil Naikwadi
>
>
> --
> Click for exclusive coverage on the New Bajaj Pulsar 220 the fastest Indian
> bike
>
> http://www.zigwheels.com/Features/Bajaj-Pulsar-220-DTSi-Special-Coverage/Pulsar_20090623-1-1
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________________
> Nagios Plugin Development Mailing List
> Nagiosplug-devel at lists.sourceforge.net
> Unsubscribe at
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>



-- 
Liu Lantao
College of Information Science and Technology, Beijing Normal University
EMAIL: liulantao ( at ) gmail ( dot ) com ;
WEBSITE: http://www.liulantao.com/ .
------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20090803/4a904867/attachment.html>


More information about the Devel mailing list