when I create a query based monitor using the MSsQL query wizard. query would not run and on inspection I found that there were extra characters embeded in the query string.
here is an example
check_xi_mssql_query!--username xxxx --password "xxxx" --database master --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "Expected result" --decode --warning 50 --critical 200
MS SQL Wizard having extra characters in query string
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: MS SQL Wizard having extra characters in query string
Can you show us what the string "should" look like? Do you have a screenshot of the service's CCM page in CCM > Services > "Service Name" or can you copy the service definition from:
Please remove any security related information.
Code: Select all
/usr/local/nagios/etc/services/"servicename".cfgRe: MS SQL Wizard having extra characters in query string
This is the view from CCM services edit view.
--username xxx--password "xxxx" --database master --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "Expected result" --decode --warning 50 --critical 200
the query should look like
select count(*) from sys.sysperinfo
Below is the file view
define service {
host_name xxxxx
service_description MSSQL Query - SampleQuery
use xiwizard_mssqlquery_service
check_command check_xi_mssql_query!--username xxxx --password xxxxx --database master --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "Expected result" --decode --warning 50 --critical 200
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard mssqlquery
register 1
}
--username xxx--password "xxxx" --database master --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "Expected result" --decode --warning 50 --critical 200
the query should look like
select count(*) from sys.sysperinfo
Below is the file view
define service {
host_name xxxxx
service_description MSSQL Query - SampleQuery
use xiwizard_mssqlquery_service
check_command check_xi_mssql_query!--username xxxx --password xxxxx --database master --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "Expected result" --decode --warning 50 --critical 200
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard mssqlquery
register 1
}
Re: MS SQL Wizard having extra characters in query string
What version of XI are you running?
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: MS SQL Wizard having extra characters in query string
Nagios XI 2012R1.6
Re: MS SQL Wizard having extra characters in query string
First of all, that version of XI may have an issue with url encoding in the ccm, I suggest you upgrade to 2012r2.0. Afterwards, try fixing the check $ARGn$ and let us know if the problem still persists.
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: MS SQL Wizard having extra characters in query string
we are on a trial version of xi, will upgrade work on that?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: MS SQL Wizard having extra characters in query string
You should be able to download the tarball, and install it as per our upgrade instructions, you trial will still expire on the same day:
http://assets.nagios.com/downloads/nagi ... ctions.pdf
http://assets.nagios.com/downloads/nagi ... ctions.pdf