Alerting on a process needing a restart

When a process needs restarting for injection to complete, there’s no way of us knowing until we manually check via the UI or an API call.  Is there a way to alert on this issue so we know when processes are not correctly monitored.

hi, I’d be very interested to know how to find this out, by pure coincidence we’ve noticed this issue on a couple of processes - See below
Process isn’t monitored
Process is ready to be monitored, waiting for injection status…
If there is some way to be informed of this status, I would appreciate it.

Hi @Kulraj_Atwal,

You can check your processes that need to be restart with Processes API - GET all processes which returns under MonitoringState a Boolean element called restartRequired.

You can set alert into dynatrace with Events API v2 - POST an event

In order to run it automatically every minute you can create Active Gate extension (v1).

HTH

Yos

Problem with that is that (apart from creating the extension) is that it also shows true for processes that are injected but need a restart due to the agent being updated.

Good point @Kulraj_Atwal

To eliminate those you can check if the agent version of the process instance is different then the one on the host. 🙄

HTH

Yos

Thanks @Yosi_Neuman, worst case we may have to develop that solution.

Although being as we pay Dynatrace so much i was hoping they might develop something we can all use to alert on it ootb :slightly_smiling_face:

How would you work with this status below?
Process isn’t monitored
Process is ready to be monitored, waiting for injection status…

Is there any way to list only these processes via API and create an alert for them?

Hi @jiri_stefanek

IMO Its a combination of expectedMonitoringState and actualMonitoringState elements under monitoringState

Process isn’t monitored = expectedMonitoringState = OFF

Process is ready to be monitored, waiting for injection status =  actualMonitoringState = OFF & expectedMonitoringState = ON

HTH

Yos

Hi @Kulraj_Atwal

Please check the attached AG extension.

** Please be aware that its a quick and dirty one ,which checked only on sand box environment **

It browses all processes and if there is a a process marked as restartRequired its look for the Host OA version and compere it with the process OA version, if the versions are not equals CUSTOM_ALERT is set with ‘Need to restart’ message, if the version are equals AVAILABILITY_EVENT is set with 'Must restart" message.

Both events are set for 2 minutes timeout so it will close automatically after restartRequired is change to False.

Here is one problem open after upgrading  OA and not restating the Outlook

HTH

Yos 
custom.remote.python.CheckIfProcessNeedRestart.zip (5.1 KB)

Alerts on availability using the alerting profiles.

https://www.dynatrace.com/support/help/how-to-use-dynatrace/problem-detection-and-analysis/notificat…

https://www.dynatrace.com/support/help/how-to-use-dynatrace/problem-detection-and-analysis/basic-con…

Yeah those 2 links dont answer my question, thanks though :slightly_smiling_face:

Thanks @Yosi_Neuman i will have  a look at this and report back.

Hi @Yosi_Neuman,

This is a good suggestion however the process/topology api is deprecated and to be replaced by the v2 entity api. The v2 entity api does not return those properties when you query processes so unless the v2 api is changed this solution isn’t viable.

Thanks
Jack

Hi @Jack_Stuart

Process API is not listed (yet) as deprecated one in Deprecated APIs

IMO its still OK to use it till Entity API will show also this information.

Yos

Thanks @Yosi_Neuman. My bad, I misinterpreted the yellow banner. Do you have any suggestions on how we would use the entity api to show the information? it doesn’t look to get returned in the entities properties.

Is there any way to list only these processes via API and create an alert for them?
Process isn’t monitored
Process is ready to be monitored, waiting for injection status…

Any tips how to do it?

Hi @jiri_stefanek

Please look at my answer below its includes an active gate extension that you can play with and change in order to get what you are looking for.

HTH

Yos

Hi @Jack_Stuart

Sorry, as you noticed I also did not find a way to get this information, regarding the state of the process, from entity api. :roll_eyes:

Yos

@jiri_stefanek / @Yosi_Neuman  there is a new API (/monitoringstate) which, I guess, will replace the legacy process groups API v1 for querying the states. I guess it still needs some improvements, but it looks promising.

This is what happens when dynatrace is keep evolving all the time :dynaspin:

In other words: The enemy of the good is better :dancing_blob:

Thanks @Julius_Loman !!

Yos