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

Alerting on a process needing a restart

Kulraj_Atwal
Participant

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.

24 REPLIES 24

jiri_stefanek
Contributor

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.

Yosi_Neuman
DynaMight Guru
DynaMight Guru

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 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

Kulraj_Atwal
Participant

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

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

Kulraj_Atwal
Participant

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 🙂

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

Yosi_Neuman_1-1653493759136.png

HTH

Yos 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

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

Hi @Yosi_Neuman ,

 

I tested your .py file. It ran but showed no results. Can you let me know if the results of running the tool will produce any report files?

 

Thank you for your help.

Hi @CuongNTM 

The attached zip file was made to be load and run as  ActiveGate extension which will run the code every minute and open CUSTOM_ALERT or AVAILABILITY_EVENT which will generate a problem.

You can collect information about all the problems with Rest API to a different tool and produce a report from the pulled data.

Another way to tackle your need can be with the /monitoringstate AP@Julius_Loman mentioned 

HTH

Yos 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

Hi @Yosi_Neuman ,

 

Thank you for your help. I will learn more about what you mentioned. If there is a more useful tool, can you recommend it to me?

Hi @CuongNTM 

Don't think right now there is another way to do that

Yos 

 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

jiri_stefanek
Contributor

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

 

Yosi_Neuman_0-1653471881760.png

HTH

Yos 

 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

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 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

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.

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. 🙄

Yos 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

Yeah those 2 links dont answer my question, thanks though 🙂

jiri_stefanek
Contributor

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 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

Julius_Loman
DynaMight Legend
DynaMight Legend

@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.

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

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  

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

strudeau
Observer

Has there been any out of the box development on tracking process needing restart for injection to complete? Do we still need to build a custom extension to monitor this or has there been a dynatrace app built to do just that? Thanks.

Featured Posts