![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I would like to monitor our DB2 database for tablespaces which are not in a normal state; this could mean detecting tablespaces in "backup pending" mode. I would like to do it through a Nagios plugin[1] which queries the system catalogs for tablespaces where status is <> from something or NOT IN (...) - Kind of how I do to detect tables where status is non-normal: http://troels.arvin.dk/db/db2/nagios...ablestatus.sql But I can't seem to find a way to do it: It doesn't look like syscat.tablespaces has a STATUS column, for example. Am I overlooking something, or is the only way to parse output from "db2 list tablespaces"? 1: http://troels.arvin.dk/db/db2/nagios/check_db2 |
#3
| |||
| |||
|
|
On 2010-09-16 17:05, Troels Arvin wrote: Hello, I would like to monitor our DB2 database for tablespaces which are not in a normal state; this could mean detecting tablespaces in "backup pending" mode. I would like to do it through a Nagios plugin[1] which queries the system catalogs for tablespaces where status is <> from something or NOT IN (...) - Kind of how I do to detect tables where status is non-normal: http://troels.arvin.dk/db/db2/nagios...ablestatus.sql But I can't seem to find a way to do it: It doesn't look like syscat.tablespaces has a STATUS column, for example. Am I overlooking something, or is the only way to parse output from "db2 list tablespaces"? 1: http://troels.arvin.dk/db/db2/nagios/check_db2 Hi Troels, have you tried sysibmadm.SNAPTBSP_PART? Example: [lelle@c-83-219-209-129 ~]$ db2 "select TBSP_NAME, TBSP_STATE from sysibmadm.SNAPTBSP_PART" |
#4
| |||
| |||
|
|
Hi Troels, have you tried sysibmadm.SNAPTBSP_PART? [...] |
|
select * from nagios.tablespace_status SQL1092N ... does not have the authority to perform the requested |
#5
| |||
| |||
|
|
Even setting up a view like this gives no errors, but when a non- privileged user tries to read from the view, access is denied: ... I don't want my monitoring system to have to be running with high privileges. Is my only choice a clumsy sudo-executed shell-script which parses output from "list tablespaces"? |
#6
| |||
| |||
|
|
I don't want my monitoring system to have to be running with high privileges. Is my only choice a clumsy sudo-executed shell-script which parses output from "list tablespaces"? No, of course not. There is a SYSMON privilege (in the database manager configuration) that can be granted to a group. Just make sure your nagios user belongs to whatever group you designate for SYSMON. |
#7
| |||
| |||
|
|
Ian wrote: I don't want my monitoring system to have to be running with high privileges. Is my only choice a clumsy sudo-executed shell-script which parses output from "list tablespaces"? No, of course not. *There is a SYSMON privilege (in the database manager configuration) that can be granted to a group. *Just make sure your nagios user belongs to whatever group you designate for SYSMON. But won't that give the monitoring system access to view SQL statements? (Which may contain sensitive information.) |
![]() |
| Thread Tools | |
| Display Modes | |
| |