Page 1 of 2

How to display the CPU Utilization of linux machine in %

Posted: Thu Jul 27, 2017 2:37 am
by vnoc
Hi all,

I am new to the Nagios Core and recently I am facing few concerns on nagios . Could any one guide me in this.

->I need the CPU Utilization in percentage means at present the default one we will get as OK - load average: 0.00, 0.00, 0.00 but i need as percentage
->Is there any option of auto discover of all the machines in that network

Re: How to display the CPU Utilization of linux machine in %

Posted: Thu Jul 27, 2017 9:49 am
by mcapra
vnoc wrote:I need the CPU Utilization in percentage means at present the default one we will get as OK - load average: 0.00, 0.00, 0.00 but i need as percentage
The metrics provided for a given check depend 100% on the plugin being used. If you're using the stock check_load plugin from the nagios-plugins package, it's going to give it as decimals.

You would need to use a different plugin. check_cpu_stats.sh should report percentages:
https://exchange.nagios.org/directory/P ... sh/details

Or, if this is an external machine you are monitoring, you might consider using NCPA with check_ncpa:
https://www.nagios.org/ncpa/help.php
vnoc wrote:Is there any option of auto discover of all the machines in that network
Not within Nagios Core, though Nagios XI has an auto-discovery component that runs a basic nmap of the network and churns out Nagios hosts/services:
https://www.nagios.com/products/nagios-xi/
http://nagiosxi.demos.nagios.com/

Re: How to display the CPU Utilization of linux machine in %

Posted: Thu Jul 27, 2017 1:36 pm
by bolson
Thanks Matt!

Re: How to display the CPU Utilization of linux machine in %

Posted: Thu Jul 27, 2017 8:13 pm
by vnoc
Thanks for your response

But one of my college used to a python based script which gives the output in percentage of CPU in linux .

Right now he is out of our office and i am unable to access it.

Can you go through that and help me in resolving this and also please find the attachment of screenshot of error

Re: How to display the CPU Utilization of linux machine in %

Posted: Thu Jul 27, 2017 8:18 pm
by vnoc
And is the nagios XI a free version or licensed version

Can't we use Nagios XI auto descovery plugins in nagios core

Re: How to display the CPU Utilization of linux machine in %

Posted: Fri Jul 28, 2017 10:08 am
by mcapra
check_nrpe is a plugin that reaches out to an NRPE agent on a remote machine and executes Nagios plugins to return their results back to Nagios Core. It's only one piece of the puzzle, we would need to know what script your colleague is using to assist further.

Here's good walkthrough for setting up NRPE, but again this is only one piece of the puzzle:
https://exchange.nagios.org/directory/T ... -7/details
vnoc wrote:And is the nagios XI a free version or licensed version
It's free to try for 60 days or up to 7 monitored hosts.
vnoc wrote:Can't we use Nagios XI auto descovery plugins in nagios core
Nope. It's actually a full-blown Nagios XI component, not just a plugin.

Re: How to display the CPU Utilization of linux machine in %

Posted: Fri Jul 28, 2017 11:41 am
by lmiltchev
@vnoc do you have any more questions? Can we lock the topic?

Re: How to display the CPU Utilization of linux machine in %

Posted: Wed Aug 02, 2017 1:18 am
by vnoc
no still the issue is not fixed right so please don't lock it

Re: How to display the CPU Utilization of linux machine in %

Posted: Wed Aug 02, 2017 5:02 am
by vnoc
Please find the attachment of script used

Re: How to display the CPU Utilization of linux machine in %

Posted: Wed Aug 02, 2017 9:52 am
by tmcdonald
You have not attached anything. Please try again and make sure your script is properly attached.