Json cgi output breaks when..
Posted: Tue Jun 02, 2015 5:48 am
Hello..
I have a setup a nagios server to monitor our streaming services.. what we have today is not flexible enough, and it looks like nagios is..
The way i do the tests is to load a master.m3u8 file, and then look through it for content, if content is found the plugin reports all ok, master.m3u8 could not be loaded it reports 404 not found, and then theres the final option, which is really what we need most, but sadly also what breaks the json output it would seem, We often see that the stream is working OK, but either the primary or backup streams will go down.. to check for this i regex through the master.m3u8 file and look for all bitrates and primary and backup streams, if either is missing i output the enitre content of the master.m3u8 file to "long_plugin_output" if one or two alerts fail and the master.m3u8 is loaded into long_plugin_output all is well, but during my testing i forced 16 streams to fail (by making nagios regx for the wrong word) and this prompted the json to fail.. the json will just end at random points..
In the error log of the apache this is logged: http://pastebin.com/DPpnwipD
ive tested this on two differnt Centos 6.6 VM's with plenty of memory and CPU, ive tested it with 4.0.8 and 4.1.0RC all with the same results.
The clear workaround for me is ofcoruse to shave off the content of master.m3u8 file and only display what i need, however id really like to just be able to throw everything into the alert, and seeing as this all works fine in the nagios gui i figured it should work into json too.
I have a setup a nagios server to monitor our streaming services.. what we have today is not flexible enough, and it looks like nagios is..
The way i do the tests is to load a master.m3u8 file, and then look through it for content, if content is found the plugin reports all ok, master.m3u8 could not be loaded it reports 404 not found, and then theres the final option, which is really what we need most, but sadly also what breaks the json output it would seem, We often see that the stream is working OK, but either the primary or backup streams will go down.. to check for this i regex through the master.m3u8 file and look for all bitrates and primary and backup streams, if either is missing i output the enitre content of the master.m3u8 file to "long_plugin_output" if one or two alerts fail and the master.m3u8 is loaded into long_plugin_output all is well, but during my testing i forced 16 streams to fail (by making nagios regx for the wrong word) and this prompted the json to fail.. the json will just end at random points..
In the error log of the apache this is logged: http://pastebin.com/DPpnwipD
ive tested this on two differnt Centos 6.6 VM's with plenty of memory and CPU, ive tested it with 4.0.8 and 4.1.0RC all with the same results.
The clear workaround for me is ofcoruse to shave off the content of master.m3u8 file and only display what i need, however id really like to just be able to throw everything into the alert, and seeing as this all works fine in the nagios gui i figured it should work into json too.