Problems with all sql checks since update wizard
Problems with all sql checks since update wizard
"/usr/local/nagios/libexec/check_mssql_database.py" has been updated? I updated all components and wizards and now all my sql checks are failing. Please help.
(No output on stdout) stderr: File "/usr/local/nagios/libexec/check_mssql_database.py", line 29
Could I get a link to the old version asap pls?
(No output on stdout) stderr: File "/usr/local/nagios/libexec/check_mssql_database.py", line 29
Could I get a link to the old version asap pls?
Last edited by WillemDH on Wed Feb 11, 2015 1:32 pm, edited 1 time in total.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Problems with all sql checks since update wizard please
I will see if I can dig one up. Are you doing any sort of escaping in your checks (for $ signs etc)
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Problems with all sql checks since update wizard please
Andy,
No escaping, this is the argument I'm passing for one such check that is failing.
Command: $USER1$/check_mssql_database.py -H $HOSTADDRESS$ $ARG1$
$ARG1$
My backup colleague can give me a version of yesterday in 1,5 hours, there is a chance we did some edits in the script, but this has been a very long time ago, so there might not be an issue with the update. I'll be sure in about 2 hours.
Grtz
No escaping, this is the argument I'm passing for one such check that is failing.
Command: $USER1$/check_mssql_database.py -H $HOSTADDRESS$ $ARG1$
$ARG1$
Code: Select all
-U 'nagios_sql' -P 'password' -T 'NFPT' -I NFIT --activetransGrtz
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Problems with all sql checks since update wizard please
When you recover the old one, lets diff them.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Problems with all sql checks since update wizard
Restored the backup and it works again. DId a diff, but I don't see immediately where the issue could be.... I don't find any custom changes we might have done..
Logicall the issue must be in this line:
as we only use 2 checks for each database, active transactions and database size. As there have been no changes to the database size part, the issue should be in that part of the code. There is one less ; in the updated version.
Any idea why this was changed? I'm gonna test editing the updated version and remove add the ; again.
Logicall the issue must be in this line:
Code: Select all
stdout = '%s%s|%s=%s%s;%s;%s;;;' % (prefix, stdout, label, strresult, unit, options.warning or '', options.critical or '')as we only use 2 checks for each database, active transactions and database size. As there have been no changes to the database size part, the issue should be in that part of the code. There is one less ; in the updated version.
Any idea why this was changed? I'm gonna test editing the updated version and remove add the ; again.
Last edited by WillemDH on Wed Feb 11, 2015 3:26 pm, edited 1 time in total.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Problems with all sql checks since update wizard
HMm when I add another ; again, I get
Code: Select all
"import cPickle as pickle
^
IndentationError: expected an indented block"Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Problems with all sql checks since update wizard
Ok, after adding a ; and indenting the import pickle blocks, somehow it worked again. I attached the working version in this thread. It might be a good idea to let the developer take a look.
Grtz
Willem
Grtz
Willem
You do not have the required permissions to view the files attached to this post.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Problems with all sql checks since update wizard
Ok, it seems like perfdata is no longer working for all the MSSQL Database checks, but it already stopped working 23/12 it seems. Any tips to get the graphs working again?
This is example perfdata from the last check result for active tranasctions:
and for db size:
See screenshots for an overview of last year active transactions and dbsize for one example db.
This is example perfdata from the last check result for active tranasctions:
Code: Select all
Performance Data: log_file_usage=0.0;;;;;Code: Select all
KB=31715264.0;;;;;You do not have the required permissions to view the files attached to this post.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Problems with all sql checks since update wizard
Can you grab a tail of the npcd and parfdata logs:
Code: Select all
tail -25 /usr/local/nagios/var/npcd.log
tail -25 /usr/local/nagios/var/perfdata.logFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Problems with all sql checks since update wizard
Try and take out a ';'
That was the change, it was reported that an extra ';' was breaking the performance data.
Per
'label'=value[UOM];[warn];[crit];[min];[max]
(no trailing ';')
Not sure where the indentation got reformat... Will fixx that.
==>brian.
Also, what is version of the MSSQL Database Wizard that you are currently using? (Admin->Manage Config Wizards)
lmiltchev
That was the change, it was reported that an extra ';' was breaking the performance data.
Per
'label'=value[UOM];[warn];[crit];[min];[max]
(no trailing ';')
Not sure where the indentation got reformat... Will fixx that.
==>brian.
Also, what is version of the MSSQL Database Wizard that you are currently using? (Admin->Manage Config Wizards)
lmiltchev