> -----Original Message-----
> From: Kaushal Shriyan [mailto:kaushalshri...@gmail.com]
> Sent: Tuesday, July 31, 2012 3:20 AM
> To: m...@catsnest.co.uk; Nagios Users List
> Subject: Re: [Nagios-users] customizable php script
> 
> On Tue, Jul 31, 2012 at 2:30 PM, RichTea <m...@catsnest.co.uk> wrote:
> >
> >
> > On Tue, Jul 31, 2012 at 5:37 AM, Kaushal Shriyan
> > <kaushalshri...@gmail.com>
> > wrote:
> >>
> >> On Mon, Jul 30, 2012 at 4:05 PM, Kaushal Shriyan
> >> <kaushalshri...@gmail.com> wrote:
> >> > Hi,
> >> >
> >> > I have the php script which outputs the below variables along with
> >> > the values.
> >> >
> >> > #php solr_discount_check.php
> >> > PHP Deprecated:  Directive 'register_long_arrays' is deprecated in
> >> > PHP
> >> > 5.3 and greater in Unknown on line 0
> >> > OutOfStock:15105
> >> > DiffId:0
> >> > DiffAtbt:0
> >> > InSync:15257
> >> >
> >> > Is there a way to set nagios sms/email alert for the above use
> case.
> >> > Any specific nagios plugin which can address this typical usecase?
> >> >
> >> > Regards,
> >> >
> >> > Kaushal
> >>
> >> Hi
> >>
> >> Can someone please reply to my earlier post to this mailing list.
> >>
> >> Regards
> >>
> >> Kaushal
> >>
> >
> > http://lmgtfy.com/?q=writing+a+nagios+plugin
> >
> >
> > PS people _might_ answer quicker if you actually ask a question!
> >
> > Ritchie
> 
> Hi Ritchie
> 
> Is there a way to get the below output in the sms/email in a similar
> fashion. when i run my php code. For example php myphpcode.php gives me
> below details:-
> 
> OutOfStock:15105
> DiffId:0
> DiffAtbt:0
> InSync:15257
> 
> Let me explain the format the first field is OutOfStock and its value
> is 15015 and so on so forth and let me know if you need more
> information.

Read the documentation, specifically the parts about the plugin API here:

http://nagios.sourceforge.net/docs/3_0/pluginapi.html

It should be relatively trivial to convert your script to work as a Nagios
plugin.  You really haven't provided any kind of detail on how to determine
what you expect for these values, and when Nagios should alert... but I'd
assume you know all that and can tweak your PHP script a little so that it
works with Nagios the way you want it to.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
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

Reply via email to