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

monitoredEntitiesMonitoringStateClient - Simple visualization to get PGI by state

arturo_mondelo
Dynatrace Advisor
Dynatrace Advisor

Hi,
I'm trying to use the monitoredEntitiesMonitoringStateClient (Classic Environment V2 | Dynatrace Developer) 

But i'm getting a 540 error running in a Notebook, while using others (like problemsClient) from the same sdk is just working properly. How can troubleshoot further whats going on? Is there any place to get more details around the errors? 

5 REPLIES 5

sw
Dynatrace Helper
Dynatrace Helper

Can you provide your example please?
I tested following example which works.

import { monitoredEntitiesMonitoringStateClient } from '@dynatrace-sdk/client-classic-environment-v2';
export default async function () {
return await monitoredEntitiesMonitoringStateClient.getStates({ entitySelector: 'type("PROCESS_GROUP_INSTANCE")'});
}

 

Julius_Loman
DynaMight Legend
DynaMight Legend

This monitoring state client really does not have pagination support or filtering on states which are not ok? I could not find any way how to use it effectively in a larger environment (>500 PGI) since the API returns 500 results at maximum.

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

You can return the PGI with unhealthy states, with:

import { monitoredEntitiesMonitoringStateClient } from '@dynatrace-sdk/client-classic-environment-v2';
export default async function () {
return monitoredEntitiesMonitoringStateClient.getStates({entitySelector: 'type("PROCESS_GROUP_INSTANCE"),healthState("UNHEALTHY")'});
}

Well, this does not work the expected way. I've never seen any entity in any environment in the UNHEALTH healthState.

For example in the demo live environment, this returns empty result with querying the UNHEALTHY state, but there are process groups having issue (state: "WARNING").


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

arturo_mondelo
Dynatrace Advisor
Dynatrace Advisor

Thank you! I was missing the entitySelector literal, thus not working!
Just tested an is working as well! Many thanks!!!

Featured Posts