Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
I need to pull the monitoring status from the web front end for status.newrelic.com . On the command line, I've got it working perfectly using this command, with exact spacing and cr/lf of course:
The issue being, the .cfg files don't seem to parse cr/lf's properly. I'd define it as a macro but again, the only way I know how to do that is in the context of the .cfg, which doesn't parse it properly.
If I have to pass an exact multi-line ARG with whitespace and cr/lf, what's the best method of doing that?
I'm going to ask a few questions so we have a baseline for where things are installed and what functionality you have. What version of Core are you using? Was it compiled from source or installed from distro repos? On what OS/version is nagios running? cat /etc/*-release may be of use.
I'm going to ask a few questions so we have a baseline for where things are installed and what functionality you have. What version of Core are you using? Was it compiled from source or installed from distro repos? On what OS/version is nagios running? cat /etc/*-release may be of use.
Hia,
We're running Nagios 4.2.4 on Ubuntu 16.04.01 (Xenial Xerus) with the intention of setting up cross monitoring (with New Relic for example), general enterprise monitoring, etc. It was all compiled from source.
It seems a bit unnecessary and a performance issue waiting to happen to check a large amount of output, but if you must do so I would put the static version in a file and call it from the command:
Thanks for the multiple options! I'm going to look into bot cat'ing out the parameter, as well as the New Relic-specific options that were mentioned (though the technique is going to eventually be needed for broader application).
rrauwl wrote:the technique is going to eventually be needed for broader application
You know more than I do about your situation, but if all you are doing is using regex on a website, then you are going to have to rewrite it for each site and each time they update the site. Of course, this might be true with APIs too, but I suspect there will be more backward compatibility with APIs.
It's also common for people to mimic an industry leader's API. Plenty of copied twitter, Amazon, and last.fm just off the top of my head. So, it might turn out the API route is more portable than you think. I don't know about New Relic's space though. Just food for thought.