cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Monitoring state API for process groups (/api/v2/monitoringstate)

Julius_Loman
DynaMight Legend
DynaMight Legend

Dynatrace 1.261 introduced new API /api/v2/monitoringstate  for querying status of monitoring for process group instances. At first sight this looks as a replacement for legacy process group API v1.

It seems this API is not yet in the documentation , @jaroslaw_orlows can you give a look?

I'd like to ask folks using the API already how can you use it on a larger scale?

I ran into two issues severly limiting usage of this API:

  • API does not support pagination and the response is limited to 500 entities. How do you use it? Querying entities indivudually is not really an effective way of API usage.
  • API does not seem to support filtering for monitoring state itself - typically I need to query processes where there an issue (like severity equals warning). There is just the healthState(UNHEALTHY) - which does not reflect the monitoring state.
Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner
11 REPLIES 11

ChadTurner
DynaMight Legend
DynaMight Legend

im right there with you on this @Julius_Loman. Have you made any headway with this?

-Chad

Julius_Loman
DynaMight Legend
DynaMight Legend

@ChadTurner no, there is no progress I'm aware of. In the current state is not useful for us, we are still using the legacy v1 smartscape API for process groups (mostly detecting processes requiring restarts).

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Yeah I tend to fall back on the Legacy methods even when they are "Deprecated" lol 

-Chad

Julius_Loman
DynaMight Legend
DynaMight Legend

Looks like some of my wishes sometimes make it to the product 😁
In 1.275 there is finally pagination supported as described in release notes. Still waiting for filtering on the monitoring states :dynaspin:

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

MichalC
Participant

Hi,

I'd like to get a list of all process groups with status "restart_required". I supposed it should be entitySelector like this for monitoringState API: type("PROCESS_GROUP_INSTANCE"),healthState("HEALTHY"),state("restart_required") but there is response:

{
"error": {
"code": 400,
"message": "Constraints violated.",
"constraintViolations": [
{
"path": "entitySelector",
"message": "Scope: state. Cannot deserialize value: \"restart_required\"",
"parameterLocation": "QUERY",
"location": null
}
]
}
}

We need such option for filtering to replace depracated API: .../api/v1/entity/infrastructure/processes?restartRequired=true&includeDetails=true.

Please help.

Michal

That's what I mentioned above. That API does not allow filtering on the severity or state value. You can only query by entitySelector and then iterate the output, which is far from being effective.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Julius_Loman
DynaMight Legend
DynaMight Legend

Hello @florian_APIgner or other Dynatraces responsible for this API.

There are still issues with using this API, please improve it:

  • entitySelector does not allow filtering on last seen time, despite the PGI does have this property. It's not flexible  to loop through all process group (even non-deep monitored ones) which are inactive for years. There are no other options to specify the timerange.
  •  entitySelector does not allow filtering on severity or injection state
  • Response should be optionally enriched with other related entities and properties - such as Process group display name, Host ID, Host name, and Management zones name, ...
  • Please add this to the documentation. This endpoint is not listed in https://docs.dynatrace.com/docs/shortlink/api-entities-v2 or anywhere else in the documentation
Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Hi,

Dynatrace Product Managers please improve this API, we need improvements too.

Agree with Julius, some filtering and response enrichment would be very helpful here.

ItamarMM
Visitor

Please, the situation is so absurd, I don't think it is normal that we must have to do invididual calls over thousands of processes just to obtain a list of what we need to restart...

Using this API we need to iterate through tousands of process instances at present to get a list PODs to restart. It's far from green coding and it's to slow to use it during our deployments. Dynatrace please improve it quickly.

Featured Posts