state of nodes

Hi everyone, is there any way to validate the state (started,stopped,failed,restarted) from the api nodes of the applications?

I’m asking this because when some nodes are turned off or stopped, Davis doesn’t give any alert.

Thanks a lot, regards!!

This would be a good use case for Synthetic HTTP Monitors, assuming the APIs are HTTP-based.

Also, if you have or can create a health check API you can use it to send events to Dynatrace via our Events API.

You can use REST /rest/state (no auth) to check the server’s status - e.g. RUNNING - this can be used for Synthetic checks easily.

More info you can find under:

/api/v1.0/onpremise/cluster

example response:

[<br>  {<br>    "id": 1,<br>    "clusterMemberAddress": "1.1.2.2:5701",<br>    "operationState": "RUNNING",<br>    "buildVersion": "1.194.0",<br>    "osInfo": "Platform: Linux, Version: 5.3.0-1023-aws, Architecture: amd64, Processors: 16",<br>    "jvmInfo": "VM: OpenJDK 64-Bit Server VM, Version: 1.8.0_252, Vendor: AdoptOpenJDK, Memory [maxMemory=17408M, initHeap=17408M, maxHeap=17408M, usedMeta=12M, committedMeta=12M, totalPhysicalMemory=62851M, freePhysicalMemory=40939M]",<br>    "dnsEntryPointUris": [],<br>    "restServiceRootUris": [<br>      "https://ip-1-1-2-2.eu-west-1.compute.internal:8021/api/v1.0",<br>      "https://1.1.2.2:8021/api/v1.0"<br>    ],<br>    "communicationUris": [<br>      "http://ip-1-1-2-2.eu-west-1.compute.internal:8020/communication",<br>      "http://1.1.2.2:8020/communication"<br>    ]<br>  },

for each node. You can also find there “operationState” field. States can be:

OFFLINE(0),                // initial - server not running<br>STARTUP(1),                   // startup is in progress<br>STARTUP_CANCELED(2),         // startup was canceled due to some severe problem<br>RUNNING(3),                   // fully operational, accepts all data, fully visible<br>RUNNING_FORSAKEN(4),         // fully operational but invisible for ALL Agents, no paths should be sent to the server. configurable via config.properties<br>SHUTDOWN_PHASED_OUT(5),          // prior to shutdown ==> still operate messages but is not visible to agents anymore<br>SHUTDOWN(6),               // shutdown is in progress<br>// special modes<br>EMERGENCY(7),              // some emergency situation (e.g. low memory) - may happen during startup/shutdown or normal operation<br>STARTUP_SUSPENDED(8),        // basic startup finished but not connected to cluster or database, no tenants started<br>DATABASE_DISCONNECTED(9),     // database got disconnected during runtime, similar to READ_ONLY mode but without config requests<br>UNDEFINED(10),             // not known<br><br>SHUTDOWN_IMMINENT(11);       // state before SHUTDOWN_PHASED_OUT, rest api still works in this state, even if server was (is) in emergency

I assumed the question was about application API enpoints…but maybe this is a better take!

@Radoslaw S. what is the complete URL for “/api/v1.0/onpremise/cluster”? Thanks!

You prefix that with your cluster node IP or cluster URL.