How to display the CPU Utilization of linux machine in %

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.
vnoc
Posts: 54
Joined: Thu Jul 27, 2017 1:51 am

How to display the CPU Utilization of linux machine in %

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

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

Post 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/
Former Nagios employee
https://www.mcapra.com/
bolson

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

Post by bolson »

Thanks Matt!
vnoc
Posts: 54
Joined: Thu Jul 27, 2017 1:51 am

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

Post 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
Attachments
Nagios.JPG
vnoc
Posts: 54
Joined: Thu Jul 27, 2017 1:51 am

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

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

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

Post 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.
Former Nagios employee
https://www.mcapra.com/
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post by lmiltchev »

@vnoc do you have any more questions? Can we lock the topic?
Be sure to check out our Knowledgebase for helpful articles and solutions!
vnoc
Posts: 54
Joined: Thu Jul 27, 2017 1:51 am

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

Post by vnoc »

no still the issue is not fixed right so please don't lock it
vnoc
Posts: 54
Joined: Thu Jul 27, 2017 1:51 am

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

Post by vnoc »

Please find the attachment of script used
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post by tmcdonald »

You have not attached anything. Please try again and make sure your script is properly attached.
Former Nagios employee
Locked