Monitoring Microsoft Azure from Nagiosxi

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mohan23
Posts: 118
Joined: Tue Oct 03, 2017 7:11 am

Re: Monitoring Microsoft Azure from Nagiosxi

Post by mohan23 »

Before we proceed with this wizard, would like to know how will be the traffic between nagios and Cloud VM and is there any impact to the VM in terms of performance and could you let me know how this monitoring works using NCPD for Cloud VM. Like how NPCD and nagios get these metrics of VM .
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring Microsoft Azure from Nagiosxi

Post by lmiltchev »

NCPA uses psutil on the backend and it doesn't require much processing power. NCPA is a very light-way agent, and you won't notice any performance issues with it.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mohan23
Posts: 118
Joined: Tue Oct 03, 2017 7:11 am

Re: Monitoring Microsoft Azure from Nagiosxi

Post by mohan23 »

So if it is windows VM , do we need to install psutil separately apart from NCPA installation or NCPA package contains psutil in it? How about for Linux VM?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring Microsoft Azure from Nagiosxi

Post by lmiltchev »

You don't need to install anything separately, including the psutil package. It's all done automatically, when you install NCPA. NCPA will work on Windows, Linux, and Mac OS X. There are links to the specific documentation sections for different operating systems here:

https://www.nagios.org/ncpa/#docs
Be sure to check out our Knowledgebase for helpful articles and solutions!
mohan23
Posts: 118
Joined: Tue Oct 03, 2017 7:11 am

Re: Monitoring Microsoft Azure from Nagiosxi

Post by mohan23 »

Thank you for all the information that you have shared. I have one more query on how we can monitor process status that have argument or command line?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring Microsoft Azure from Nagiosxi

Post by lmiltchev »

The filter parameters for processes are described in our documentation here:

https://www.nagios.org/ncpa/help.php#ap ... -processes

You could use something like this:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H <remote server ip address> -t '<token>' -M 'processes' -q 'cmd=<command>,match=search'
If the command is too long and complicated, the check may fail unless you figure out how to do the escaping, however you have an option to use many "keywords", that are part of your command. For example, if you had a command like this one:

Code: Select all

"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe -contentproc --channel=7840.1.1472066713\\529801474 -childID 1 -isForBrowser -prefsHandle 1236 -prefsLen 13176 -schedulerPrefs 0001,2 -parentBuildID 20180830143136 -greomni C:\\Program Files (x86)\\Mozilla Firefox\\omni.ja -appomni C:\\Program Files (x86)\\Mozilla Firefox\\browser\\omni.ja -appdir C:\\Program Files (x86)\\Mozilla Firefox\\browser - 7840 \\\\.\\pipe\\gecko-crash-server-pipe.7840 1860 tab"
you could use parts of it in your check:
"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe -contentproc --channel=7840.1.1472066713\\529801474 -childID 1 -isForBrowser -prefsHandle 1236 -prefsLen 13176 -schedulerPrefs 0001,2 -parentBuildID 20180830143136 -greomni C:\\Program Files (x86)\\Mozilla Firefox\\omni.ja -appomni C:\\Program Files (x86)\\Mozilla Firefox\\browser\\omni.ja -appdir C:\\Program Files (x86)\\Mozilla Firefox\\browser - 7840 \\\\.\\pipe\\gecko-crash-server-pipe.7840 1860 tab"
Example:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -t 'mytoken' -M 'processes' -q 'cmd=firefox.exe,cmd=channel=7840.1.1472066713,match=search'
You could add more keywords/filters to your check if you need to narrow it down:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -t 'mytoken' -M 'processes' -q 'cmd=<keyword-1>,cmd=<keyword-2>,<keyword-3>,<keyword-4>,match=search'
Hope this makes sense.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mohan23
Posts: 118
Joined: Tue Oct 03, 2017 7:11 am

Re: Monitoring Microsoft Azure from Nagiosxi

Post by mohan23 »

If I use like cmd=chrome.exe, cmd="*.regex.*", will this kind of regex work?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring Microsoft Azure from Nagiosxi

Post by lmiltchev »

When you said:
cmd=chrome.exe, cmd="*.regex.*"

you probably ment
'cmd=chrome.exe,match=regex'.

Yes, this should work fine:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -t '<your token>' -M 'processes' -q 'cmd=chrome.exe,match=regex'
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked