MS SQL Database configuration issues

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: MS SQL Database configuration issues

Post by HAL »

Also we have tested this on a test server with the MSSQL version: MSSQL Server Standard edition (64bit) version: 10.50.1600 RTM. - This was successful.

Now we are trying on other systems which has the MSSQL version as MSSQL server standard edition, version: 9.0.5000 sp4
Is this making a difference?
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: MS SQL Database configuration issues

Post by HAL »

Also it would be great if you could list down the privileges required for DB user on Database? SO we can ask our DB admin to grant such access to user created for Nagios
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: MS SQL Database configuration issues

Post by scottwilkerson »

As far as I know the everything should work fine on both of these server versions.

From your nagios XI server can you run

Code: Select all

telnet 192.168.5.178 1433
As for rights, they will need read access to the master database for most of the default checks.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: MS SQL Database configuration issues

Post by HAL »

I have tried to telnet from Nagios to the db server with the port 1433.
The connection succeeds.

Also which IP is this 192.168.5.178? was this an example? Anyways I have tried for it and there was no response
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: MS SQL Database configuration issues

Post by scottwilkerson »

Can you show me the command you are running from the command line that is failing.

thanks
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: MS SQL Database configuration issues

Post by HAL »

These are command we are executing, we can see the connection time but if we pass any other parameter we see this error message

python ./check_mssql_database.py -H ipaddress -U username -P password -T LINE_CSM_HOEGH --time2connect -w 20 -c 30
OK:Time to connect is 0.006s|Time_to_connect=0.006s;;;;

python ./check_mssql_database.py -H ipaddress-U username -P password -T LINE_CSM_HOEGH --loggrowths -w 20 -c 30
CRITICAL:Can access server but cannot query.

interestingly, the same command works well on another datasebase:

python ./check_mssql_database.py -H ipaddress-U username -P password -T line_csm10_5_hoegh_test -p 1433 --datasize --warning 20 --critical 30
CRITICAL:Size of database is 336320KB|Size_of_database=336320KB;;;;
python ./check_mssql_database.py -H ipaddress-U username -P password -T line_csm10_5_hoegh_test -p 1433 --loggrowths --warning 20 --critical 30
OK:Log Growths is 0|Log_Growths=0;;;;

This is a test server and other arguments also work well on it, however when we try to run this command on a production server or any other test database for that matter we start to receive this error.
Last edited by HAL on Thu Oct 25, 2012 12:27 pm, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: MS SQL Database configuration issues

Post by scottwilkerson »

The user you are connecting with needs select access to the sysperfinfo table of the master database
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: MS SQL Database configuration issues

Post by HAL »

I believe the account we are using has access to it, we have replicated privilages and access rights of the database where we successfully executed this command to other databases but i'll check with my admin once again. Could you please tell me the checks we need to perform in case user has access to sysperfinfo.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: MS SQL Database configuration issues

Post by scottwilkerson »

Generally speaking this error

Code: Select all

CRITICAL:Can access server but cannot query.
means permission problem.

I don't know if there is another step.....
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
HAL
Posts: 151
Joined: Thu Sep 27, 2012 7:57 am

Re: MS SQL Database configuration issues

Post by HAL »

We have checked with our db team. They confirmed that the user created has the sysperfinfo table of master database.
As already stated that we have one db server on which we are successfully able to perform the queries and on others we get the error CRITICAL:can access the database, but cannot query.

So I dont think there is problem with the user created or privileges.
Locked