Server Management - Systems Insight Manager
1819794 Members
3541 Online
109607 Solutions
New Discussion юеВ

SIM : SQL-Query for System Health Status

 
SOLVED
Go to solution
MiMe
New Member

SIM : SQL-Query for System Health Status

Hello,

how can I query System Health Status within
the corresponding Database? Which table holds
this information?

I just want to extract System Health Status
in a quick way without Web-GUI.

We use HPSIM 5.1 with SP2 on Windows and Oracle
10g2 on HP-UX.

Thanks in advance!
MiMe
5 REPLIES 5
NJK-Work
Honored Contributor

Re: SIM : SQL-Query for System Health Status

Hi,

You will want to query the "devices" table in the SIM database (assuming SQL 2000/2005 database).

Within that table is a column called "OverallStatus". A "Heathly" server has a value of "1". I am not sure of the exact values of other status types. It does look like a "Minor" server is 3. For example I have server right now with a failed SCSI drive that shows a 3 in that column.

So I guess a simple query would be:

SELECT TOP 100 PERCENT dbo.devices.Name AS [Server Name], dbo.devices.OverallStatus AS [Server Status]
FROM dbo.devices
WHERE dbo.devices.ProductTypeStr = 'Server'
ORDER BY dbo.devices.Name

Then you could create a lookup table based on what your findings are for status values (1 = Normal, 3 = Minor, etc.) to give you a more readable output.

Nelson
NJK-Work
Honored Contributor

Re: SIM : SQL-Query for System Health Status

Or sorry, I see you mentioned Oracle. I don't know if the table structure is the same in Oracle. And my query is MS SQL server specific...
Change_happens
Honored Contributor
Solution

Re: SIM : SQL-Query for System Health Status

you can see halth status in devices table.
You can use below query:
SELECT devices.OverallStatus, devices.Name, devices.ProductType FROM devices ORDER BY OverallStatus DESC

To see health status of devices. here health status are in integer format so to convert it use below:
0 - Unknown
1 - OK
2 - OK
3 - Minor
4 - Major
5 - Critical
6 -
7 -
8 -
9 - Disable

Hope u need only above.
MiMe
New Member

Re: SIM : SQL-Query for System Health Status

That was the solution!
Thx!
MiMe
MiMe
New Member

Re: SIM : SQL-Query for System Health Status

Question solved!