Hi Neal,
I used your SQL and modified it by using QOS_COMPUTER_UPTIME as QoS and appropriate RN_QOS_DATA_???? table to suit my environment.
I have 3 robots "A9C0B9VM1", "A9C0B9VM2", "A9DCSR1SBC0B9" and 1 hub-robot "A9C0B9VM0" in my development environment. Every host has Nimsoft robot installed and CDM probe is installed with "uptime" option checked on all of them.
All non-hub robots are not rebooted so far. Only hub-robot is rebooted multiple times.
My queries are mentioned below.
1) Please let me know the significance of the check "RN_QOS_DATA_0005.samplevalue > 2000" in the SQL query. As far as I know, any uptime value of less than 3600 should reflect system as rebooted. When "2000" was used in the SQL query, the availability was reflected as 0% for all non-hub robots and 1.40% for all hub robots as confirmed from the screenshot below.
However when I changed the check to "RN_QOS_DATA_0005.samplevalue < 3600", I got correct values of percentage availability as confirmed from the screenshot below.
2) How to get the output report in bar format ? For me, I am only able to get the output in text format.
The modified version of SQL is pasted below.
SELECT
S_QOS_DATA.target,
CAST
(
ROUND
(
AVG
(
(
CASE
WHEN
RN_QOS_DATA_0005.samplevalue IS NULL
OR
RN_QOS_DATA_0005.samplevalue < 3600
THEN
CAST
(
0 AS Decimal(15, 2)
)
ELSE
CAST
(
1 AS Decimal(15, 2)
)
END
)
) * 100, 3, 0
) AS Decimal(15, 2)
) AS Availability
FROM
S_QOS_DATA
INNER JOIN
RN_QOS_DATA_0005 ON S_QOS_DATA.table_id = RN_QOS_DATA_0005.table_id
WHERE
(
S_QOS_DATA.qos = 'QOS_COMPUTER_UPTIME'
)
AND
(
MONTH ( RN_QOS_DATA_0005.sampletime ) = MONTH ( { fn NOW() } )
)
AND
(
YEAR ( RN_QOS_DATA_0005.sampletime ) = YEAR( { fn NOW() } )
)
GROUP BY
S_QOS_DATA.target
ORDER BY
Availability
Regards,
Amit Saxena