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

State field for Process Group in Host Overview

jerry_lobenstei
Dynatrace Advisor
Dynatrace Advisor
Hello Team,
 
Question:  There are at least half a dozen Icons with a messages that shows up here on Processes in the Host Overview.
 
I have seen variations of messages that are associated to processes, but most recently a couple around Host Group issues.    Other than seeing them in the UI.  I had no idea they existed unless I ran across them looking at the host overview.   I am trying to see if these events are tracked and stored anywhere?   
 
I would like to be able to report or alert when these types of things when they occur.  In these two cases the agent is installed and injected and gathering data, its just stating inconsistency with host groups.  I am looking at reporting on a few of the other status issues that are available.
 
Where is this message coming from?
  • I can't find it in the OneAgent Logs.  
  • I can't find it in the OneAgent or Process Logs
  • I don't see a way to get it using the OneAgent CTL Utility
  • I don' see a way to get it via the API (State ?)
  • I don't see it in Process, PGI, Entity or Events in any of the Grail data
  • I don't see it in the OneAgent Health Overview (State ?)
  • I don't see it in the system events
* It seems like this value is in the Tenant or backend hosting somewhere, but not anywhere else but in the WebUI.    
 
The field is:   State   is anyone aware of this icon/message and who knows where this data may be kept; any kind of information about it.   Even better yet will it be in GRAIL?  It would be nice to have this state field to be able to use DQL on when pulling up OneAgent PG and PGI status.
7 REPLIES 7

patryk_ozimek
Helper

Hi,

As far as I know the only possibility to gather this information is API call to /api/v2/entities (https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/entity-v...). You can filter the data using entitySelector in order to get only process group instances. So I recommend to create a workflow with the JS step that makes an api call, procesess data and then creates an event.

Best Regards
Patryk

The Problem here is I think this data is coming form the platform itself and not being exposed to the API pushed into EVENTS.


You won't see the values from the State field anywhere in the API output.   The only data you get is: 

  • Health state (HEALTHY, UNHEALTHY): healthState("HEALTHY")
  • Similar data can be found in the OneAgent health overview

First API call:

curl -X 'GET' \
  'https://{environmentid}.live.dynatrace.com/api/v2/entities?entitySelector=type%28%22PROCESS_GROUP_INSTANCE%22%29' \
  -H 'accept: application/json; charset=utf-8' \
  -H 'Authorization: Api-Token <token>’


Then you iterate through all entityId from the response:

Make API call

curl -X 'GET' \
  'https://{environmentid}.live.dynatrace.com/api/v2/monitoringstate?entitySelector=entityId%28%22PROCESS_GROUP_INSTANCE-<id>%22%29' \
  -H 'accept: application/json; charset=utf-8' \
  -H 'Authorization: Api-Token <token>’


And in the response you will see for example:

  "totalCount": 1,
  "monitoringStates": [
    {
      "entityId": "PROCESS_GROUP_INSTANCE-<id>”,
      "state": "restart_required",
      "severity": "warning",
      "params": [
        {
          "key": "pids",
          "values": ""
        }
      ]
    }
  ],
  "pageSize": 500
}


The whole flow can be executed in the Dynatrace Workflow.

Best Regards
Patryk

I must of typed something wrong.  Then I thought it could it be because I am trying this on a Process running in a POD/Container?   But I got it to work.   Thanks for the assistance.

Response body
 
Download
{  "totalCount": 1,  "monitoringStates": [    {
      "entityId": "PROCESS_GROUP_INSTANCE-CCC9F0446F895C6A",      "state": "agent_injection_suppression",      "severity": "info",      "params": [        {
          "key": "reason",          "values": "statically_linked_go_injection_disabled"
        }
      ]
    }
  ],
  "pageSize": 500
}

 

jerry_lobenstei
Dynatrace Advisor
Dynatrace Advisor

I also found it can be run a Notebook using the Code feature.   You can run the JavaScript and call the API and process it within the notebook and produce the tables results. 

It is true but you wanted to create an alert based on this data and it can be done only in the workflows

jerry_lobenstei
Dynatrace Advisor
Dynatrace Advisor

Correct!    They are very happy with the Notebook.    Alerting will be the next discussion.    The customer is just starting to look at workflows.    But I did give them a good overview of what we would require and next steps. 

Featured Posts