Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 30534

Get uptime as percentage via script

$
0
0

I saw some previous discussion on this but never a good answer.

Here is what I came up with:

  • Create an xml file in Kaseya\xml\Procedures\AgentProcSQL\0\SQLRead
  • Paste in the following

<?xml version="1.0"?>
<queryList>
<queryDef label="Uptime percentage" sql="SELECT CONVERT(numeric(5, 2),(Cast(totalOnline as Float) / Cast(measureTime as Float))*100) FROM dbo.getMachUptime(+++GETVARGUID:, GETDATE() - 30) " />
</queryList>

  • Use SQLRead() function in your script, select "Uptime percentage"  from the drop down and give the variable a name.
  • Use the variable like you would any other

I would guess this would work as a NameValuePart for reports as well but I haven't tested it yet.

*reports uptime for the last 30 days

--Chris


Viewing all articles
Browse latest Browse all 30534

Latest Images

Trending Articles



Latest Images