Hi Team,
we are seeing one strange thing for reports on memory metric for Linux servers.. for some servers data is showing in graph and for some its not..
when we go to services and do a 'run check command', it displays the current % value... so what could be the issue here?
Memory reports showing no data for few Linux servers
-
- Posts: 105
- Joined: Thu Apr 09, 2020 7:35 am
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Memory reports showing no data for few Linux servers
Hi,
Usually, when the performance graphs are not working, it's because the perf files are spooling up and not getting processed. From your description, it sounds like the plugin is returning performance data but just verify this again in the Advanced Tab (+) for the host or service.
If that's correct, then follow the steps in the article below to increase the timeout and load_threshold (to around 50-60), and let me know if the graphs start working again.
Nagios XI - Performance graph Problems
Regards,
Benjamin
Usually, when the performance graphs are not working, it's because the perf files are spooling up and not getting processed. From your description, it sounds like the plugin is returning performance data but just verify this again in the Advanced Tab (+) for the host or service.
If that's correct, then follow the steps in the article below to increase the timeout and load_threshold (to around 50-60), and let me know if the graphs start working again.
Nagios XI - Performance graph Problems
Regards,
Benjamin
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 105
- Joined: Thu Apr 09, 2020 7:35 am
Re: Memory reports showing no data for few Linux servers
hi benjamin,
m not seeing performance data info as well for many servers...attached image for reference:
m not seeing performance data info as well for many servers...attached image for reference:
You do not have the required permissions to view the files attached to this post.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Memory reports showing no data for few Linux servers
Hi @pratikmehta003,
Looks like the plugin does not provide performance data. If you want to double-check this, run the plugin from the CLI as well.
Benjamin
Looks like the plugin does not provide performance data. If you want to double-check this, run the plugin from the CLI as well.
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 105
- Joined: Thu Apr 09, 2020 7:35 am
Re: Memory reports showing no data for few Linux servers
Hi benjamin,
just to update here...we are doing memory monitoring via custom script and not default... but its via ncpa method only..
so why is the performance data not being collected and how do i check it from CLI?
just to update here...we are doing memory monitoring via custom script and not default... but its via ncpa method only..
so why is the performance data not being collected and how do i check it from CLI?
-
- Posts: 105
- Joined: Thu Apr 09, 2020 7:35 am
Re: Memory reports showing no data for few Linux servers
and from wat i understand the monitoring is happening but the performance data is not collected/stored..
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Memory reports showing no data for few Linux servers
Hi @pratikmehta003,
If you're using a custom plugin that is being called by NPCA, it will be necessary to add the option performance data output. This output must follow the formatting specifications otherwise it cannot be processed by NPCD.
For more information on this, take a look at the performance data guidelines on the following page:
https://nagios-plugins.org/doc/guidelines.html'
--Benjamin
If you're using a custom plugin that is being called by NPCA, it will be necessary to add the option performance data output. This output must follow the formatting specifications otherwise it cannot be processed by NPCD.
For more information on this, take a look at the performance data guidelines on the following page:
https://nagios-plugins.org/doc/guidelines.html'
--Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 105
- Joined: Thu Apr 09, 2020 7:35 am
Re: Memory reports showing no data for few Linux servers
Hi Benjamin,
When click on link, its stating "The requested URL /doc/guidelines.html' was not found on this server." So can you please send the exact link.
and we are using below script for memory collcection which is placed on the target server and then called in Nagios.
#!/bin/bash
#Script is tested for SUSE
if [[ -z "$1" ]] || [[ -z "$2" ]] || [[ -z "$3" ]] || [[ -z "$4" ]]; then
echo " Missing Parameters! Syntax: check_xi_ncpa!-t 'mytoken' -P 5693 -M plugins/test.sh -a "-w '10' -c '20'""
exit 2
fi
warning_val=$2
critical_val=$4
#Obtain Used memory using Free command
VAL="$(free -m | awk 'FNR == 2 {print ($2-($4+$6+$7))*(100/$2)}')"
#Convert to Integer for comparison with Warning and Critical Values which are Integer
mem_used=${VAL%.*}
#Compare Memory utilization with threshold values
if [ $mem_used -ge $critical_val ]
then
echo "CRITICAL - Memory Utilization is $mem_used %"
exit 2
elif [ $mem_used -ge $warning_val ]
then
echo "WARNING - Memory Utilization is $mem_used %"
exit 1
else
echo "OK - Memory Utilization is $mem_used %"
exit 0
fi
When click on link, its stating "The requested URL /doc/guidelines.html' was not found on this server." So can you please send the exact link.
and we are using below script for memory collcection which is placed on the target server and then called in Nagios.
#!/bin/bash
#Script is tested for SUSE
if [[ -z "$1" ]] || [[ -z "$2" ]] || [[ -z "$3" ]] || [[ -z "$4" ]]; then
echo " Missing Parameters! Syntax: check_xi_ncpa!-t 'mytoken' -P 5693 -M plugins/test.sh -a "-w '10' -c '20'""
exit 2
fi
warning_val=$2
critical_val=$4
#Obtain Used memory using Free command
VAL="$(free -m | awk 'FNR == 2 {print ($2-($4+$6+$7))*(100/$2)}')"
#Convert to Integer for comparison with Warning and Critical Values which are Integer
mem_used=${VAL%.*}
#Compare Memory utilization with threshold values
if [ $mem_used -ge $critical_val ]
then
echo "CRITICAL - Memory Utilization is $mem_used %"
exit 2
elif [ $mem_used -ge $warning_val ]
then
echo "WARNING - Memory Utilization is $mem_used %"
exit 1
else
echo "OK - Memory Utilization is $mem_used %"
exit 0
fi
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Memory reports showing no data for few Linux servers
Hi @pratikmehta003,
Sorry about that, here's the link again:
https://nagios-plugins.org/doc/guidelines.html
Here's the details ( add a pipe character in the output string and then add the performance data )
Sorry about that, here's the link again:
https://nagios-plugins.org/doc/guidelines.html
Here's the details ( add a pipe character in the output string and then add the performance data )
Nagios 3 and newer will concatenate the parts following a "|" in a) the first line output by the plugin, and b) in the second to last line, into a string it passes to whatever performance data processing it has configured. (Note that it currently does not insert additional whitespace between both, so the plugin needs to provide some to prevent the last pair of a) and the first of b) getting run together.) Please refer to the Nagios documentation for information on how to configure such processing. However, it is the responsibility of the plugin writer to ensure the performance data is in a "Nagios Plugins" format.
This is the expected format:
'label'=value[UOM];[warn];[crit];[min];[max]
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 105
- Joined: Thu Apr 09, 2020 7:35 am
Re: Memory reports showing no data for few Linux servers
Hi Benjamin,
For the above case I mentioned will u be able to help where I should define and where it should be called?
For the above case I mentioned will u be able to help where I should define and where it should be called?