Hi,
The opsgenie-lamp cli tool has output which is very hard to use for automation. For example the output below would require a lot of parsing to become usable:
% lamp getIncidentList --query "status: open" --output-format yaml --pretty
INFO[2022-02-20T10:58:10.306159-05:00] Client is configured with ApiUrl: api.opsgenie.com, LogLevel: info, RetryMaxCount: 4
2022/02/20 10:58:10 INFO : Incident List : {
"requestId": "dcbeb75a-1759-4642-8cbb-76180052aae6",
"took": 0.02,
"RateLimitState": "OK",
"RateLimitReason": "",
"RateLimitPeriod": "",
"RetryCount": 0,
"data": [
{
"id": "f0fbe12d-5e29-44ee-8649-16400705cdee",
"serviceId": "",
"tinyId": "1",
"message": "TEST Incident",
"status": "open",
"tags": [],
"createdAt": "2022-02-20T15:23:22.419Z",
"updatedAt": "2022-02-20T15:33:41.939Z",
"priority": "P5",
"ownerTeam": "",
"responders": [
{
"type": "team",
"id": "c0200188-6812-411b-9834-bccf4b739c43"
},
{
"type": "user",
"id": "85bacf31-e22b-4c02-a92a-9ca2804e1ee8"
}
],
"extraProperties": {}
}
],
"paging": {
"next": "",
"prev": "",
"first": "https://api.opsgenie.com/v1/incidents?limit=20\u0026sort=createdAt\u0026offset=0\u0026order=desc\u0026query=status:+open",
"last": "https://api.opsgenie.com/v1/incidents?limit=20\u0026sort=createdAt\u0026offset=0\u0026order=desc\u0026query=status:+open"
}
}
What I would expect to happen, especially with output set to JSON is that there would only be a JSON printed so that I could pipe to a tool like jq and then use the data to drive a script. Instead the JSON is wrapped with informational logging with no configurable way to suppress the log output.