Hi Team,
I wanted to monitor the custom extension endpoints availability. There could be nearly 400 endpoints.
With the help of API we can get the list of all endpoint along with their state like OK or ERROR.
I'm trying to achieve it by using HTTP monitor. However, first part of code itself is failing to get the output. Below is the code snippet.
let responseBody = response.getResponseBody();
let jsonData = JSON.parse(responseBody);
let output = jsonData.filter(x => x.state== "ERROR_UNKNOWN");
let output1 = JSON.stringify(jsonData);
api.info(output1);
Input data would be like below,
{"states":[{"pluginId":"custom.plugin","version":"0.10","endpointId":"49562969167943889","state":"DISABLED","stateDescription":"","timestamp":1672122740061,"hostId":null,"processId":null},{"pluginId":"custom.plugin","version":"0.10","endpointId":"-5366867616866670749","state":"OK","stateDescription":"","timestamp":1672122740061,"hostId":null,"processId":null},{"pluginId":"custom.plugin","version":"0.10","endpointId":"-7117888994516915630","state":"ERROR_UNKNOWN","stateDescription":"Authentication failed.","timestamp":1672122746065,"hostId":null,"processId":null},{"pluginId":"custom.plugin","version":"0.10","endpointId":"-3595606123279855614","state":"DISABLED","stateDescription":"","timestamp":1672122740061,"hostId":null,"processId":null}]}
Has anybody done it successfully. Please suggest.
Regards,
AK
Solved! Go to Solution.
@AK, I replied on the other thread, but given your approach, I would ask if it's generic extensions from the Hub, or your extensions, that you are using?
Hello @AntonioSousa,
Its a custom extension (oneagent) and locally developed in conjunction with Dynatrace support.
Regards,
AK
@AK,
Despite understanding the other approach I replied in the other thread, if you have control over development of the extension, feeding some errors back to Dynatrace directly from the extensions might help in reducing for instance MTTI...
Hello Folks,
Does spread operator, object.assign, .map functions are not at all available to use under HTTP monitor?
Can anybody please suggest alterative.
Regards,
AK
As per my tests, .map, .push are supported. I'm able to achieve the desired result with HTTP monitor.
Regards,
AK