Re: [Nagios-users] Querying nagios object information through command line
Hi Wenhua This looks interesting as well. I will take a look at it. Thanks, Yu Wenhua Zhang さんは書きました: Hi Yu, I think status-txt may do some help for you. status-txt is implemented to duplicate the output of status.cgi in plain text to achieve this goal, making it easier for other applications/services to use Nagios data. You can also get the source code from github https://github.com/shiziwen/nagios-status2txt;. Besides plain text, there have been some other format you can use, XML and JSON. JOSN: http://exchange.nagios.org/directory/Addons/APIs/JSON/status-2Djson/details XML: http://svn.jasonantman.com/nagios-xml/statusXML-krzywanski.php, and this(c version of nagios-xml: http://svn.jasonantman.com/nagios-xml/php_module/), which maybe more usefull for light-weight or high-performance purpose. I hope it can do some help for you. 2012/5/17 Yu Watanabe yu.watan...@jp.fujitsu.com: Benny , Ritchie , Daniel Thank you for the advice. I will take a look at the mklivestatus. Thanks. Yu C. Bensend 、オ、〓マ抱、ュ、゛、キ、ソ: Is there a script or a module that can be called through a command line and can retrieve nagios object definition , host , service? I am thinking of calling from php program. I found that config.cgi has an ability of fetching the object definition but it seems that it returns html info. It would be helpful if someone can share their thoughts. Livestatus can do this, and it's MUCH quicker/more lightweight/better (IMHO) than NDOUtils. http://mathias-kettner.de/checkmk_livestatus.html Benny -- The problem with quotes on the internet is that it's very hard to verify their authenticity. -- Abraham Lincoln -- 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 __ -- 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] Querying nagios object information through command line
Hi Yu, If you have any problem or idea about status-txt(or status-json and statusXML), please fill free to let me know. 2012/5/17 Yu Watanabe yu.watan...@jp.fujitsu.com: Hi Wenhua This looks interesting as well. I will take a look at it. Thanks, Yu Wenhua Zhang さんは��きました: Hi Yu, I think status-txt may do some help for you. status-txt is implemented to duplicate the output of status.cgi in plain text to achieve this goal, making it easier for other applications/services to use Nagios data. You can also get the source code from github https://github.com/shiziwen/nagios-status2txt;. Besides plain text, there have been some other format you can use, XML and JSON. JOSN: http://exchange.nagios.org/directory/Addons/APIs/JSON/status-2Djson/details XML: http://svn.jasonantman.com/nagios-xml/statusXML-krzywanski.php, and this(c version of nagios-xml: http://svn.jasonantman.com/nagios-xml/php_module/), which maybe more usefull for light-weight or high-performance purpose. I hope it can do some help for you. 2012/5/17 Yu Watanabe yu.watan...@jp.fujitsu.com: Benny , Ritchie , Daniel Thank you for the advice. I will take a look at the mklivestatus. Thanks. Yu C. Bensend 、オ、〓マ抱、ュ、�a、キ、ソ: Is there a script or a module that can be called through a command line and can retrieve nagios object definition , host , service? I am thinking of calling from php program. I found that config.cgi has an ability of fetching the object definition but it seems that it returns html info. It would be helpful if someone can share their thoughts. Livestatus can do this, and it's MUCH quicker/more lightweight/better (IMHO) than NDOUtils. http://mathias-kettner.de/checkmk_livestatus.html Benny -- The problem with quotes on the internet is that it's very hard to verify their authenticity. -- Abraham Lincoln -- 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 __ -- 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 -- Live Security
Re: [Nagios-users] Querying nagios object information through command line
On Wed, May 16, 2012 at 9:14 AM, Yu Watanabe yu.watan...@jp.fujitsu.comwrote: Hi all! Is there a script or a module that can be called through a command line and can retrieve nagios object definition , host , service? I am thinking of calling from php program. I found that config.cgi has an ability of fetching the object definition but it seems that it returns html info. It would be helpful if someone can share their thoughts. I only know of Nagios::Config It is in CPAN. We were using some awk for parsing the config too but I can not find that right now, i do not remember it being too complicated though. Ritchie, -- -- http://23.me.uk/2 -- --Time flies like an arrow; fruit flies like a banana. -- Thanks, Yu -- 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] Querying nagios object information through command line
Is there a script or a module that can be called through a command line and can retrieve nagios object definition , host , service? I am thinking of calling from php program. I found that config.cgi has an ability of fetching the object definition but it seems that it returns html info. It would be helpful if someone can share their thoughts. Livestatus can do this, and it's MUCH quicker/more lightweight/better (IMHO) than NDOUtils. http://mathias-kettner.de/checkmk_livestatus.html Benny -- The problem with quotes on the internet is that it's very hard to verify their authenticity. -- Abraham Lincoln -- 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] Querying nagios object information through command line
I second livestatus, we use it all the time, plus there is a webservice as well, livestatusSlave which might work better with your php. http://nagios.larsmichelsen.com/livestatusslave/ Dan -Original Message- From: C. Bensend [mailto:be...@bennyvision.com] Sent: Wednesday, May 16, 2012 7:01 AM To: nagios-users@lists.sourceforge.net Subject: Re: [Nagios-users] Querying nagios object information through command line Is there a script or a module that can be called through a command line and can retrieve nagios object definition , host , service? I am thinking of calling from php program. I found that config.cgi has an ability of fetching the object definition but it seems that it returns html info. It would be helpful if someone can share their thoughts. Livestatus can do this, and it's MUCH quicker/more lightweight/better (IMHO) than NDOUtils. http://mathias-kettner.de/checkmk_livestatus.html Benny -- The problem with quotes on the internet is that it's very hard to verify their authenticity. -- Abraham Lincoln -- 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] Querying nagios object information through command line
Benny , Ritchie , Daniel Thank you for the advice. I will take a look at the mklivestatus. Thanks. Yu C. Bensend さんは書きました: Is there a script or a module that can be called through a command line and can retrieve nagios object definition , host , service? I am thinking of calling from php program. I found that config.cgi has an ability of fetching the object definition but it seems that it returns html info. It would be helpful if someone can share their thoughts. Livestatus can do this, and it's MUCH quicker/more lightweight/better (IMHO) than NDOUtils. http://mathias-kettner.de/checkmk_livestatus.html Benny -- The problem with quotes on the internet is that it's very hard to verify their authenticity. -- Abraham Lincoln -- 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] Querying nagios object information through command line
Hi Yu, I think status-txt may do some help for you. status-txt is implemented to duplicate the output of status.cgi in plain text to achieve this goal, making it easier for other applications/services to use Nagios data. You can also get the source code from github https://github.com/shiziwen/nagios-status2txt;. Besides plain text, there have been some other format you can use, XML and JSON. JOSN: http://exchange.nagios.org/directory/Addons/APIs/JSON/status-2Djson/details XML: http://svn.jasonantman.com/nagios-xml/statusXML-krzywanski.php, and this(c version of nagios-xml: http://svn.jasonantman.com/nagios-xml/php_module/), which maybe more usefull for light-weight or high-performance purpose. I hope it can do some help for you. 2012/5/17 Yu Watanabe yu.watan...@jp.fujitsu.com: Benny , Ritchie , Daniel Thank you for the advice. I will take a look at the mklivestatus. Thanks. Yu C. Bensend さんは��きました: Is there a script or a module that can be called through a command line and can retrieve nagios object definition , host , service? I am thinking of calling from php program. I found that config.cgi has an ability of fetching the object definition but it seems that it returns html info. It would be helpful if someone can share their thoughts. Livestatus can do this, and it's MUCH quicker/more lightweight/better (IMHO) than NDOUtils. http://mathias-kettner.de/checkmk_livestatus.html Benny -- The problem with quotes on the internet is that it's very hard to verify their authenticity. -- Abraham Lincoln -- 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 -- 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