Hi
Is there a way to get storage/cpu usage from api?
I want it as text not image
//Looc
Hi
Is there a way to get storage/cpu usage from api?
I want it as text not image
//Looc
Some more background to this question.
When getting alerts using API i would like to get more details of the alert.
Getting a “Service up/down” i can check “/api/v0/services/” and get services that is down.
When getting a “Storage usage” i would like to get the current usage of the disks connected to that device.
you can write all this down into your alert template
This here is mine, as example
Device Name: {{ $alert->hostname }}
Severity: {{ $alert->severity }}
Uptime: {{ $alert->uptime_short }}
@if ($alert->state == 0)
Time elapsed: {{ $alert->elapsed }}
@endif
Timestamp: {{ $alert->timestamp }}
Location: {{ $alert->location }}
@if ($alert->description !="")Description: {{ $alert->description }} @endif
@if ($alert->notes !="")Notes: {{ $alert->notes }} @endif
Server: {{ $alert->sysName }}
@foreach ($alert->faults as $key => $value)
Mount Point: {{ $value['storage_descr'] }}
Percent Utilized: {{ $value['storage_perc'] }}
GB Free: {{ number_format($value['storage_free'] /1024 /1024 /1024, 2) }}
@endforeach
maybe this matches your needs
yes, but i want it using API to be able to show in another system.
//looc