no Graph when using HP 3PAR plugin
-
itsupport_sgp
- Posts: 19
- Joined: Fri Aug 15, 2014 12:06 am
no Graph when using HP 3PAR plugin
Hi,
Does anyone know how to configure HP 3PAR plugin?
Currently, I have use the HP 3PAR plugin found in the Nagios library but unfortunately it is not able to display any graph representation.
Our objective is to have 3PAR monitoring with graph such as disk utilisation, IOPS and etc..
Then we will use the capacity planning to generate the report.
Does anyone know how to configure HP 3PAR plugin?
Currently, I have use the HP 3PAR plugin found in the Nagios library but unfortunately it is not able to display any graph representation.
Our objective is to have 3PAR monitoring with graph such as disk utilisation, IOPS and etc..
Then we will use the capacity planning to generate the report.
Re: no Graph when using HP 3PAR plugin
Does the plugin return perfdata? Not all of the plugins do. Can you show us the actual command that you are running in the command line, along with the output of it?
You can learn more about the perfdata, returned from nagios plugins by reviewing the nagios plugin development guidelines here:
https://nagios-plugins.org/doc/guidelines.html#AEN200
You can learn more about the perfdata, returned from nagios plugins by reviewing the nagios plugin development guidelines here:
https://nagios-plugins.org/doc/guidelines.html#AEN200
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
itsupport_sgp
- Posts: 19
- Joined: Fri Aug 15, 2014 12:06 am
Re: no Graph when using HP 3PAR plugin
I get it on why I don't have the perfdata now but how can I have it setup using the 3par plugin attached?lmiltchev wrote:Does the plugin return perfdata? Not all of the plugins do. Can you show us the actual command that you are running in the command line, along with the output of it?
You can learn more about the perfdata, returned from nagios plugins by reviewing the nagios plugin development guidelines here:
https://nagios-plugins.org/doc/guidelines.html#AEN200
command
check_3par_cap_nl!3paradm!!!!!!!
Sample output
OK : Used NL capacity = 58%
You do not have the required permissions to view the files attached to this post.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: no Graph when using HP 3PAR plugin
So the plugin clearly does not output performance data.
Anything following the pipe symbol | is treated as performance data.
Here is how performance data needs to be structured for Nagios to recognise it:
https://nagios-plugins.org/doc/guidelines.html#AEN200
To take the check you are currently providing as an example, this appears to be the check_cap_nl check.
Now the way the check is written, you will need to add this code to three separate lines (387, 393, 397):
So it will end up looking like this:
And the output will be something like this:
Just to be clear, this will only add performance data for the check_cap_nl check. You will need to do similar to other checks for them to produce performance data.
Just to comment, the beginning of the script shows the last update was 2014/05/07, so you might be able to email the author and request them to update the script so it outputs performance data.
Anything following the pipe symbol | is treated as performance data.
Here is how performance data needs to be structured for Nagios to recognise it:
https://nagios-plugins.org/doc/guidelines.html#AEN200
Code: Select all
'label'=value[UOM];[warn];[crit];[min];[max]Now the way the check is written, you will need to add this code to three separate lines (387, 393, 397):
Code: Select all
|'Used NL capacity'=$USEDCAPPCNL\%;$PCWARNINGNL;$PCCRITICALNLCode: Select all
if [ $USEDCAPPCNL -ge $PCCRITICALNL ]
then
echo CRITICAL! Used NL capacity = $USEDCAPPCNL\% \( \> $PCCRITICALNL\% \) |'Used NL capacity'=$USEDCAPPCNL\%;$PCWARNINGNL;$PCCRITICALNL
rm -f $TMPDIR/3par_$COMMAND.$INSERV.out
exit 2
else
if [ $USEDCAPPCNL -ge $PCWARNINGNL ]
then
echo WARNING! Used NL capacity = $USEDCAPPCNL\% \( \> $PCWARNINGNL\% \) |'Used NL capacity'=$USEDCAPPCNL\%;$PCWARNINGNL;$PCCRITICALNL
rm -f $TMPDIR/3par_$COMMAND.$INSERV.out
exit 1
else
echo OK : Used NL capacity = $USEDCAPPCNL\% |'Used NL capacity'=$USEDCAPPCNL\%;$PCWARNINGNL;$PCCRITICALNL
rm -f $TMPDIR/3par_$COMMAND.$INSERV.out
exit 0
fi
fiCode: Select all
OK : Used NL capacity = 58% |'Used NL capacity'=58%;80;90Just to comment, the beginning of the script shows the last update was 2014/05/07, so you might be able to email the author and request them to update the script so it outputs performance data.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: no Graph when using HP 3PAR plugin
Let us know if this works for you. Thanks for the post Box.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: no Graph when using HP 3PAR plugin
Hi, when I update the parameters as advised.
I hit the below error:
"(No output on stdout) stderr: /usr/local/nagios/libexec/check_3par: line 397: Used NL capacity=59%: command not found"
I hit the below error:
"(No output on stdout) stderr: /usr/local/nagios/libexec/check_3par: line 397: Used NL capacity=59%: command not found"
Box293 wrote:So the plugin clearly does not output performance data.
Anything following the pipe symbol | is treated as performance data.
Here is how performance data needs to be structured for Nagios to recognise it:
https://nagios-plugins.org/doc/guidelines.html#AEN200To take the check you are currently providing as an example, this appears to be the check_cap_nl check.Code: Select all
'label'=value[UOM];[warn];[crit];[min];[max]
Now the way the check is written, you will need to add this code to three separate lines (387, 393, 397):So it will end up looking like this:Code: Select all
|'Used NL capacity'=$USEDCAPPCNL\%;$PCWARNINGNL;$PCCRITICALNL
And the output will be something like this:Code: Select all
if [ $USEDCAPPCNL -ge $PCCRITICALNL ] then echo CRITICAL! Used NL capacity = $USEDCAPPCNL\% \( \> $PCCRITICALNL\% \) |'Used NL capacity'=$USEDCAPPCNL\%;$PCWARNINGNL;$PCCRITICALNL rm -f $TMPDIR/3par_$COMMAND.$INSERV.out exit 2 else if [ $USEDCAPPCNL -ge $PCWARNINGNL ] then echo WARNING! Used NL capacity = $USEDCAPPCNL\% \( \> $PCWARNINGNL\% \) |'Used NL capacity'=$USEDCAPPCNL\%;$PCWARNINGNL;$PCCRITICALNL rm -f $TMPDIR/3par_$COMMAND.$INSERV.out exit 1 else echo OK : Used NL capacity = $USEDCAPPCNL\% |'Used NL capacity'=$USEDCAPPCNL\%;$PCWARNINGNL;$PCCRITICALNL rm -f $TMPDIR/3par_$COMMAND.$INSERV.out exit 0 fi fiJust to be clear, this will only add performance data for the check_cap_nl check. You will need to do similar to other checks for them to produce performance data.Code: Select all
OK : Used NL capacity = 58% |'Used NL capacity'=58%;80;90
Just to comment, the beginning of the script shows the last update was 2014/05/07, so you might be able to email the author and request them to update the script so it outputs performance data.
Re: no Graph when using HP 3PAR plugin
Do you see this error in the CLI or in the web UI? Can you show us the actual command that you are running from the command line along with the output of it?Hi, when I update the parameters as advised.
I hit the below error:
"(No output on stdout) stderr: /usr/local/nagios/libexec/check_3par: line 397: Used NL capacity=59%: command not found"
Be sure to check out our Knowledgebase for helpful articles and solutions!
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: no Graph when using HP 3PAR plugin
Also, please upload your modified plugin.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: no Graph when using HP 3PAR plugin
Hi,
I have attached the screenshot and the check_3par script.
Here is the output from Nagios CLI:
After adding the suggested piping, there is no output:
[root@sgpnagios ~]# su nagios
[nagios@sgpnagios root]$ /usr/local/nagios/libexec/check_3par 10.198.159.73 3paradm check_3par_cap_nl
After removing the suggested piping, there is output:
[nagios@sgpnagios root]$ /usr/local/nagios/libexec/check_3par 10.198.159.73 3paradm check_cap_nl
OK : Used NL capacity = 49%
Thanks a lot for all the help on this.
Regards,
Rico
I have attached the screenshot and the check_3par script.
Here is the output from Nagios CLI:
After adding the suggested piping, there is no output:
[root@sgpnagios ~]# su nagios
[nagios@sgpnagios root]$ /usr/local/nagios/libexec/check_3par 10.198.159.73 3paradm check_3par_cap_nl
After removing the suggested piping, there is output:
[nagios@sgpnagios root]$ /usr/local/nagios/libexec/check_3par 10.198.159.73 3paradm check_cap_nl
OK : Used NL capacity = 49%
Thanks a lot for all the help on this.
Regards,
Rico
You do not have the required permissions to view the files attached to this post.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: no Graph when using HP 3PAR plugin
I looked at the plugin and I believe the problem was that the strings being echo'd were not in quotes. this may be fine for some strings, but once you add a pipe, bash is going to try to redirect output.
I edited the pligin and am posting below, however do not have the equipment to test it...
I edited the pligin and am posting below, however do not have the equipment to test it...
You do not have the required permissions to view the files attached to this post.