Get a list of Installed Collectors last seen alive before a specified number of days with an optional limit and offset.
Method: GET Path: /collectors/offline
Parameter |
Type |
Required? |
Default |
Description |
aliveBeforeDays |
Integer |
No |
100 |
Minimum number of days the Collectors have been offline. Must be at least 1 day. |
limit |
Integer |
No |
1000 |
Max number of Collectors to return. |
offset |
Integer |
No |
0 |
Offset into the list of Collectors. |
Example
In this example, setting aliveBeforeDays=10
returns a list of Installed Collectors that have been offline for at least 10 days.
Request:
curl -u '<accessId>:<accessKey>' -X GET https://api.sumologic.com/api/v1/collectors/offline?aliveBeforeDays=10
Sumo Logic endpoints like
api.sumologic.com
are different in deployments outside us1. You need to specify your deployment in the endpoint. For example
api.YOUR_DEPLOYMENT.sumologic.com
you would specify
YOUR_DEPLOYMENT
as either
au
,
ca
,
de
,
eu
,
fed
,
jp
,
us1
, or
us2
. For us1, use
api.sumologic.com
. For the others, use
api.us2.sumologic.com
, and so on. For more information, see
Sumo Logic Endpoints.
Delete Offline Collectors
Delete Installed Collectors last seen alive before a specified number of days.
Method: DELETE Path: /collectors/offline
Parameter |
Type |
Required? |
Default |
Description |
aliveBeforeDays |
Integer |
No |
100 |
The minimum number of days the Collectors have been offline. Must be at least 1 day. |
Example
In this example, setting aliveBeforeDays=10
deletes all the Installed Collectors that have been offline for at least 10 days.
Request:
curl -u '<accessId>:<accessKey>' -X DELETE https://api.sumologic.com/api/v1/collectors/offline?aliveBeforeDays=10
Response:
There will be no response body, only a 200 OK response with the message "The delete task has been initiated.". To check the status make GET requests and see if the Collectors have been deleted.
Comments
1 comment
We are noticing most of the collectors offline in < 12hrs. Do we have any api to list those collectors?
I tried
-X GET https://api.sumologic.com/api/v1/collectors/\?filter/\=dead
But is giving offline collectors with recently stopped ones as well. We are looking for which are not generating logs for last 3 to 12hrs.
Please sign in to leave a comment.