Hello, i need to produce reports of how our monitoring environment changes over the day and which tickets are reoccurring etc. I am kinda surprised PRTG cant do this automatically but hey-ho.
anyhow i am using the current alarms xml link modified to output the csv of the current alarms i need, then planning to automate this request to place 8 of these csvs a day then graph up the output for occurrences and stuff.
My question is with the following url
/api/table.csv?content=sensors&columns=downtimesince%2Cprobegroupdevice%2Csensor%2Clastvalue%2Cstatus%2Cmessage%2Cpriority%2Cminigraph%2Ccheckbox%2Cobjid%2Cbaselink&sortby=priority&tabletitle=Sensors%20With%20Alarms&varexpand=filters&filters=words%21alarms%2Cobjects%21data-filtername%3D%27id%27%7Cdata-inputname%3D%27id%27%7Cdata-rootid%3D%270%27%7Cdata-onlysensors%3D%270%27%7Cdata-sensors%3D%270%27%7Cdata-hidesensors%3D%27true%27%7Cdata-devices%3D%271%27%7Cdata-groups%3D%271%27%7Cdata-required%3D%27%27%7Cdata-probes%3D%271%27%7Cdata-allownone%3D%271%27%7Cdata-allowself%3D%271%27%7Cdata-allowroot%3D%271%27%2Ctags&filter_status=13&_=1510047052139&filter_status=14&filter_status=5&filter_status=4&filter_status=10
what do i trim out to remove the raw columns from the outputted csv
Article Comments
Ok so i have a follow up question :)
Can i modify this to have a column that tells me the group name rather than the group ID to prevent me having to create a lookup of groups attached to IDs
Also can i export a column based on sensor type rather than sensor name so that, for example, all disk space sensors are grouped rather than having a different entity for the different disk names
Nov, 2017 - Permalink
Dear samuelma,
can you clarify what exactly you want to do? I am not sure if I understood those questions right.
You can add group and device name via
&columns=group,device,...
You can filter sensor tables by sensor type, for example adding
&filter_type=wmiutctime
However, we don't have a list of the internal sensor names. If you add type to the columns, the Raw-version of the field shows the internal sensor type.
Nov, 2017 - Permalink
Dear samuelma,
the API CSV output always will show raw columns as well. The reason is that API calls are used by PRTG itself. We want to keep the API structure concise, meaning the filtering options for an API call are limited to what PRTG needs for its own operation. Since the results are usually processed further, those processing could also remove anything unwanted.
Nov, 2017 - Permalink