Issue with Status Inforamtion - Nagios XI
-
Srinija544
- Posts: 58
- Joined: Mon Oct 15, 2018 9:30 pm
Issue with Status Inforamtion - Nagios XI
Hi All,
We have placed a stored procedure in Nagios. But we are getting correct output when we do Run Check Command.
Run Check Command Output:
==================================================================================
Moderator Note: Content removed per request
===========================================================================
But In the original alert - Status Information, We are seeing error message:
WARNING - Use of uninitialized value $sql in sprintf at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 6509.
Use of uninitialized value in subroutine entry at /usr/local/lib64/perl5/DBD/Sybase.pm line 138.
Use of uninitialized value $sql in pattern match (m//) at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 6517.
Use of uninitialized value $sql in pattern match (m//) at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 6517.
, got no valid response for
[cat: /usr/local/nagios/local/DB/SQL/SSIS.sql: No such file or directory
Use of uninitialized value in sprintf at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 2953.]
===============================================================
Plugin Script:
Please find the attachment for the plugin script./
=============================================================
Command:
$USER2$/DB/MSSQL/check_mssql_health -t 20 --server $HOSTADDRESS$$ARG3$ --username=$ARG1$\\$USER5$ --password=$USER6$ --mode=$ARG2$
======================================================================
Please help me in solving this issue.
Regards,
Srinija.
We have placed a stored procedure in Nagios. But we are getting correct output when we do Run Check Command.
Run Check Command Output:
==================================================================================
Moderator Note: Content removed per request
===========================================================================
But In the original alert - Status Information, We are seeing error message:
WARNING - Use of uninitialized value $sql in sprintf at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 6509.
Use of uninitialized value in subroutine entry at /usr/local/lib64/perl5/DBD/Sybase.pm line 138.
Use of uninitialized value $sql in pattern match (m//) at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 6517.
Use of uninitialized value $sql in pattern match (m//) at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 6517.
, got no valid response for
[cat: /usr/local/nagios/local/DB/SQL/SSIS.sql: No such file or directory
Use of uninitialized value in sprintf at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 2953.]
===============================================================
Plugin Script:
Please find the attachment for the plugin script./
=============================================================
Command:
$USER2$/DB/MSSQL/check_mssql_health -t 20 --server $HOSTADDRESS$$ARG3$ --username=$ARG1$\\$USER5$ --password=$USER6$ --mode=$ARG2$
======================================================================
Please help me in solving this issue.
Regards,
Srinija.
Re: Issue with Status Inforamtion - Nagios XI
The command definition doesn't seem to match the command that is getting run - "--name "`cat /usr/local/nagios/local/DB/SQL/SSIS.sql`" --name2 'SSIS' --warning 1: --critical 0:" doesn't appear to be in the definition.
Double check the settings of the command definition as well as the plugin and please provide screenshots of the configuration and error if this doesn't help to resolve the problem.
Double check the settings of the command definition as well as the plugin and please provide screenshots of the configuration and error if this doesn't help to resolve the problem.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
Srinija544
- Posts: 58
- Joined: Mon Oct 15, 2018 9:30 pm
Re: Issue with Status Inforamtion - Nagios XI
Hi cdienger,
Thank you for your response.
Please find the attached screenshots. If the command is wrong then we should get error in Run Check Command as well.
Regards,
Srinija.
Thank you for your response.
Please find the attached screenshots. If the command is wrong then we should get error in Run Check Command as well.
Regards,
Srinija.
You do not have the required permissions to view the files attached to this post.
Re: Issue with Status Inforamtion - Nagios XI
It's not clear where the "--name "`cat /usr/local/nagios/local/DB/SQL/SSIS.sql`" --name2 'SSIS' --warning 1: --critical 0:" part of the command is defined. Is it in $ARG2$? Try redefiing the command to look like:
and then only use "sql" in $ARG2$.
Code: Select all
$USER2$/DB/MSSQL/check_mssql_health -t 20 --server $HOSTADDRESS$$ARG3$ --username=$ARG1$\\$USER5$ --password=$USER6$ --mode=$ARG2$ --name "`cat /usr/local/nagios/local/DB/SQL/SSIS.sql`" --name2 'SSIS' --warning 1: --critical 0:As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
Srinija544
- Posts: 58
- Joined: Mon Oct 15, 2018 9:30 pm
Re: Issue with Status Inforamtion - Nagios XI
Yes this command(sql --name "`cat /usr/local/nagios/local/DB/SQL/SSIS.sql`" --name2 'SSIS' --warning 1: --critical 0:) is in $ARG2$ but also we are getting the same issue.
$ARG1$: TOWER.LAN
$ARG3$: empty
when i run this command in server backend, i am gettnig correct output:
=========================
[root@dc1prd484 MSSQL]# ./check_mssql_health -t 20 --server dc1prd186.tower.lan --username=$ARG1$\\$USER5$ --password=$USER6$ --mode=sql --name "`cat /usr/local/nagios/local/DB/SQL/SSIS.sql`" --name2 'SSIS' --warning 1: --critical 0:
OK - ssis: 1 | 'ssis'=1;1:;0:
=========================
However, the output from the front end is different and wrong(doesn't satisfy our requirement).
==============================
WARNING - Use of uninitialized value $sql in sprintf at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 6509.
Use of uninitialized value in subroutine entry at /usr/local/lib64/perl5/DBD/Sybase.pm line 138.
Use of uninitialized value $sql in pattern match (m//) at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 6517.
Use of uninitialized value $sql in pattern match (m//) at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 6517.
, got no valid response for
[cat: /usr/local/nagios/local/DB/SQL/SSIS.sql: No such file or directory
Use of uninitialized value in sprintf at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 2953.]
===================================
Please find the attachment and help me on this.
Regards,
Srinija.
$ARG1$: TOWER.LAN
$ARG3$: empty
when i run this command in server backend, i am gettnig correct output:
=========================
[root@dc1prd484 MSSQL]# ./check_mssql_health -t 20 --server dc1prd186.tower.lan --username=$ARG1$\\$USER5$ --password=$USER6$ --mode=sql --name "`cat /usr/local/nagios/local/DB/SQL/SSIS.sql`" --name2 'SSIS' --warning 1: --critical 0:
OK - ssis: 1 | 'ssis'=1;1:;0:
=========================
However, the output from the front end is different and wrong(doesn't satisfy our requirement).
==============================
WARNING - Use of uninitialized value $sql in sprintf at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 6509.
Use of uninitialized value in subroutine entry at /usr/local/lib64/perl5/DBD/Sybase.pm line 138.
Use of uninitialized value $sql in pattern match (m//) at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 6517.
Use of uninitialized value $sql in pattern match (m//) at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 6517.
, got no valid response for
[cat: /usr/local/nagios/local/DB/SQL/SSIS.sql: No such file or directory
Use of uninitialized value in sprintf at /usr/local/nagios/local/DB/MSSQL/check_mssql_health line 2953.]
===================================
Please find the attachment and help me on this.
Regards,
Srinija.
You do not have the required permissions to view the files attached to this post.
Re: Issue with Status Inforamtion - Nagios XI
Can you run the command in the backend once more, except before you run it, do su - nagios and then run the command. I think it will fail, but it may give us more information on where it is failing.
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!
Re: Issue with Status Inforamtion - Nagios XI
I've also attached a modified copy of the script to get more info in /usr/local/nagios/libexec/reports.txt to compare the user and arguments that are available when executed.
Did you try defining the command as I suggested in my previous post?
Did you try defining the command as I suggested in my previous post?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
Srinija544
- Posts: 58
- Joined: Mon Oct 15, 2018 9:30 pm
Re: Issue with Status Inforamtion - Nagios XI
Hi mbellerue,
I ran this command su - nagios before running my command still we get the same output no change:
=============================
[nagios@dc1prd484 ~]$ /usr/local/nagios/local/DB/MSSQL/check_mssql_health -t 20 --server dc1prd186.tower.lan --username=$ARG1$\\$USER5$ --password=$USER6$ --mode=sql --name "`cat /usr/local/nagios/local/DB/SQL/SSIS.sql`" --name2 'SSIS' --warning 1: --critical 0:
OK - ssis: 1 | 'ssis'=1;1:;0:;;
========================================
Hi cdienger,
I have tried executing your command also but getting the same output:
$USER2$/DB/MSSQL/check_mssql_health -t 20 --server $HOSTADDRESS$$ARG3$ --username=$ARG1$\\$USER5$ --password=$USER6$ --mode=$ARG2$ --name "`cat /usr/local/nagios/local/DB/SQL/SSIS.sql`" --name2 'SSIS' --warning 1: --critical 0:
I ran this command su - nagios before running my command still we get the same output no change:
=============================
[nagios@dc1prd484 ~]$ /usr/local/nagios/local/DB/MSSQL/check_mssql_health -t 20 --server dc1prd186.tower.lan --username=$ARG1$\\$USER5$ --password=$USER6$ --mode=sql --name "`cat /usr/local/nagios/local/DB/SQL/SSIS.sql`" --name2 'SSIS' --warning 1: --critical 0:
OK - ssis: 1 | 'ssis'=1;1:;0:;;
========================================
Hi cdienger,
I have tried executing your command also but getting the same output:
$USER2$/DB/MSSQL/check_mssql_health -t 20 --server $HOSTADDRESS$$ARG3$ --username=$ARG1$\\$USER5$ --password=$USER6$ --mode=$ARG2$ --name "`cat /usr/local/nagios/local/DB/SQL/SSIS.sql`" --name2 'SSIS' --warning 1: --critical 0:
Re: Issue with Status Inforamtion - Nagios XI
The modifications will write the additional data to /usr/local/nagios/libexec/reports.txt. You may need to create this file first and make sure nagios has write permissions:
Code: Select all
touch /usr/local/nagios/libexec/reports.txt
chown nagios:nagios /usr/local/nagios/libexec/reports.txt
chmod 664 /usr/local/nagios/libexec/reports.txtAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
Srinija544
- Posts: 58
- Joined: Mon Oct 15, 2018 9:30 pm
Re: Issue with Status Inforamtion - Nagios XI
Hi mbellerue/cdienger,
This issue was resolved. Thank you all for your support.
Closing this request.
Regards,
Srinija.
This issue was resolved. Thank you all for your support.
Closing this request.
Regards,
Srinija.