Linux snmp doesn't work
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Linux snmp doesn't work
Hi,
I run the following command on my linux server : free
Here's the result :
total used free shared buff/cache available
Mem: 6104452 2833076 531460 1548 2739916 2972096
Swap: 0 0 0
That server is monitored using linux snmp wizard.
At the same time the service Memory usage displays the following alert :
Physical memory: 91%used(5436MB/5961MB) (>90%) : CRITICAL
According to free command : no memory overload, according to Nagios check : memory overload : How do you explain that ?
I run the following command on my linux server : free
Here's the result :
total used free shared buff/cache available
Mem: 6104452 2833076 531460 1548 2739916 2972096
Swap: 0 0 0
That server is monitored using linux snmp wizard.
At the same time the service Memory usage displays the following alert :
Physical memory: 91%used(5436MB/5961MB) (>90%) : CRITICAL
According to free command : no memory overload, according to Nagios check : memory overload : How do you explain that ?
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Linux snmp doesn't work
Hello, [user]Frédéric GRANAT[/user]. Can you check what version of Linux SNMP wizard you're running? Go to the Admin menu in XI, then click on Manage Config Wizards in the left column and search for the "Linux SNMP" wizard.
Also, which command is used in the service check? Does it say -m Physical or -m Memory?
Also, which command is used in the service check? Does it say -m Physical or -m Memory?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: Linux snmp doesn't work
Hi,
Can you check what version of Linux SNMP wizard you're running
=> Linux snmp 1.5.2
Also, which command is used in the service check? Does it say -m Physical or -m Memory?
=>$ARG1$ = -C ro --v2c -m Physical -w 80 -c 90 -f
Remark : Monitored server is a virtual machine
I've tried : $ARG1$ = -C ro --v2c -m Memory -w 80 -c 90 -f
And NagiosXI gives : Memory buffers: 3%used(189MB/5961MB) (<80%) : OK
By the same time the command "free" gives :
total used free shared buff/cache available
Mem: 6104452 2832204 516812 1544 2755436 2972972
Swap: 0 0 0
So Nagios check seems not better to be good (it reports 189 Mb used whereas free reports 2832204 Kb used )
Can you check what version of Linux SNMP wizard you're running
=> Linux snmp 1.5.2
Also, which command is used in the service check? Does it say -m Physical or -m Memory?
=>$ARG1$ = -C ro --v2c -m Physical -w 80 -c 90 -f
Remark : Monitored server is a virtual machine
I've tried : $ARG1$ = -C ro --v2c -m Memory -w 80 -c 90 -f
And NagiosXI gives : Memory buffers: 3%used(189MB/5961MB) (<80%) : OK
By the same time the command "free" gives :
total used free shared buff/cache available
Mem: 6104452 2832204 516812 1544 2755436 2972972
Swap: 0 0 0
So Nagios check seems not better to be good (it reports 189 Mb used whereas free reports 2832204 Kb used )
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Linux snmp doesn't work
[user]Frédéric GRANAT[/user], The command you ran shows just the buffer value. I confirmed with atop command and values match:
The most likely reason why the following command reported that memory is overloaded is that it included cached memory in the total used memory amount.
We do have an NRPE based plugin that has an option of excluding cached memory. Is using the NRPE an option in your environment?/usr/local/nagios/libexec/check_snmp_storage.pl -H 192.168.3.3 -C 209ijvfwer0df92jd --v2c -m "Physical" -T pl -w 10 -c 5 -f
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: Linux snmp doesn't work
Hi,
Thanks,
Cached memory shouldn't be taken into account but I don't want to install nrpe on my server.
What other solution do you propose ?
Thanks,
Cached memory shouldn't be taken into account but I don't want to install nrpe on my server.
What other solution do you propose ?
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Linux snmp doesn't work
[user]Frédéric GRANAT[/user], There's another plugin you can try. It doesn't include cached memory in the used result:
PS: Keep in mind that it won't 100% match with the free command output because it doesn't include buffers or reclaimable.
Code: Select all
/usr/local/nagios/libexec/check_snmp_mem.pl -H 192.168.3.3 -C 209ijvfwer0df92jd --v2c -w 80,80 -c 90,90Code: Select all
Ram : 31%, Swap : 0% : ; OKAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: Linux snmp doesn't work
Hi,
Thanks I tested it and it's better :
Free gives
total used free shared buff/cache available
Mem: 6104452 2302864 1678496 1524 2123092 3502332
That means 37% used
And the check gives 44% used
Do you think it will be more precise with the first pluggin you adviced me to user (the one that use nrpe) ?
Thanks I tested it and it's better :
Free gives
total used free shared buff/cache available
Mem: 6104452 2302864 1678496 1524 2123092 3502332
That means 37% used
And the check gives 44% used
Do you think it will be more precise with the first pluggin you adviced me to user (the one that use nrpe) ?
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Linux snmp doesn't work
[user]Frédéric GRANAT[/user], The precision is relative. The issue is that different Linux plugins calculate memory in different ways by including or not including cached memory, buffer and so on. You can certainly try the NRPE plugin:
https://support.nagios.com/kb/article/m ... s-774.html
But keep in mind that you'd need to install the nrpe agent to use it.
https://support.nagios.com/kb/article.php?id=8
Some users would rather use only SNMP in their environment, but some are ok deploying the agent.
https://support.nagios.com/kb/article/m ... s-774.html
But keep in mind that you'd need to install the nrpe agent to use it.
https://support.nagios.com/kb/article.php?id=8
Some users would rather use only SNMP in their environment, but some are ok deploying the agent.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: Linux snmp doesn't work
Hi,
Thanks,
You can close the post.
Frederic
Thanks,
You can close the post.
Frederic
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Linux snmp doesn't work
[user]Frédéric GRANAT[/user], You're welcome. Closing the thread as resolved.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.