Re: [Nagios-users] customizable php script
On Tue, Jul 31, 2012 at 5:37 AM, Kaushal Shriyan kaushalshri...@gmail.comwrote: 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 -- --Time flies like an arrow; fruit flies like a banana. -- -- 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 -- 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
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. Regards Kaushal -- 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
[Nagios-users] Retrieve historical data
Hello, If I have a host named myserver, monitored for 1 year, and I rename it myserver1, I loose the whole data history, stats and so on. Can someone explain how to get these datas to make them available for myserver1 ? If think it would be the same problem if migration from an old nagios server to a new one. Thanks for your help Regards Mykeul -- 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
Re: [Nagios-users] Retrieve historical data
On Tue, Jul 31, 2012 at 1:57 PM, Mykeul li...@mykeul.com wrote: Hello, If I have a host named myserver, monitored for 1 year, and I rename it myserver1, I loose the whole data history, stats and so on. Can someone explain how to get these datas to make them available for myserver1 ? It might sound stupid but the only way which comes into my mind is to search and replace myserver to myserver1 in the archive logs. At least if you're using log files and no db for check results and logging. If think it would be the same problem if migration from an old nagios server to a new one. Nope it wouldn't. The Nagios config would stay the same - you just need to migrate all the archive logs as well. Thanks for your help Regards Mykeul -- 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 -- 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
[Nagios-users] check_memory does not work properly
Hi all I am using a simple plug-in to check the nagios server memory. When I run it like user Nagios, it works perfectly. I see this output: OK - free memory is 40% which is within expected threshold| mem=40;10;5;0;100 When I run it with Nagios program I receive this notification: .. Command: check_local_memory State: WARNING Message:(null) . Any idea ? Marco Borsani Unix and Monitoring Sysadmin Technical Operations Dpt. tel: +39 010 4310115 fax: +39 02 30130311 cell: +39 329 5953944 ITnet Srl Società con socio unico Direzione e Coordinamento di Libero S.r.l. -- 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
Re: [Nagios-users] Derive service settings from hosts definition
On 7/30/2012 2:31 PM, Vladislav Staroselskiy wrote: Is there any way to derive certain service options from the host definition? Is there any default inheritance behavior for it? ... I really wish, service notification/contact options could be derived from hosts definitions to avoid this mess. If anyone has a suggestion on how to better organize it, I would also appreciate your feedback. Nagios does almost exactly that, except for the enabling or disabling of notifications. Services will inherit their contact_groups, notification_interval, and notification_period from their associated host if those three directives are not set in the service's definition. Search for implied inheritance down the page here: http://nagios.sourceforge.net/docs/3_0/objectinheritance.html Also, you can use a + sign to signal additive inheritance, which comes in handy if you want to modify an implied inheritance without replacing it. It's explained directly above implied inheritance on that page. -- -Chris Nothing in this message is intended to make or accept an offer or to form a contract, except that an attachment that is an image of a contract bearing the signature of an officer of our company may be or become a contract. This message (including any attachments) is intended only for the use of the individual or entity to whom it is addressed. It may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law or may constitute as attorney work product. If you are not the intended recipient, we hereby notify you that any use, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this message in error, please notify us immediately by telephone and delete this message immediately. Thank you. -- 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
Re: [Nagios-users] Derive service settings from hosts definition
On Tue, Jul 31, 2012 at 11:03 AM, Chris Beattie cbeat...@geninfo.com wrote: On 7/30/2012 2:31 PM, Vladislav Staroselskiy wrote: Is there any way to derive certain service options from the host definition? Is there any default inheritance behavior for it? ... I really wish, service notification/contact options could be derived from hosts definitions to avoid this mess. If anyone has a suggestion on how to better organize it, I would also appreciate your feedback. Nagios does almost exactly that, except for the enabling or disabling of notifications. Services will inherit their contact_groups, notification_interval, and notification_period from their associated host if those three directives are not set in the service's definition. Search for implied inheritance down the page here: http://nagios.sourceforge.net/docs/3_0/objectinheritance.html Also, you can use a + sign to signal additive inheritance, which comes in handy if you want to modify an implied inheritance without replacing it. It's explained directly above implied inheritance on that page. -- -Chris Nothing in this message is intended to make or accept an offer or to form a contract, except that an attachment that is an image of a contract bearing the signature of an officer of our company may be or become a contract. This message (including any attachments) is intended only for the use of the individual or entity to whom it is addressed. It may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law or may constitute as attorney work product. If you are not the intended recipient, we hereby notify you that any use, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this message in error, please notify us immediately by telephone and delete this message immediately. Thank you. -- 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 Also keep in mind you can use user defined host based macros that can be defined in the templates to make parameters to the service checks inherited from the host as well. I used this feature to create classes of hosts while at the same time giving me the option to tweak the thresholds on a class-by-class or host-by-host basis. Very flexible. -- 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
Re: [Nagios-users] check_memory does not work properly
Posting your check configuration is really helpful in cases like this. It's almost impossible to give a good answer without knowing how you've set the check up. From: Marco Borsani [mailto:m.bors...@it.net] Sent: Tuesday, July 31, 2012 6:52 AM To: NAGIOS Subject: [Nagios-users] check_memory does not work properly Hi all I am using a simple plug-in to check the nagios server memory. When I run it like user Nagios, it works perfectly. I see this output: OK - free memory is 40% which is within expected threshold| mem=40;10;5;0;100 When I run it with Nagios program I receive this notification: ... Command: check_local_memory State: WARNING Message:(null) .. Any idea ? 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
Re: [Nagios-users] customizable php script
-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. 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