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

Suppression of Problems during monthly OS patching

JordanGreen
Frequent Guest

Morning 

I am just after some advice or best practice on how to deal with suppression of problems during monthly windows OS patching. 

The OS server patching times and dates vary every month so setting up a constant maintenance window is not straight forward. What would i like to achieve is for host to go into maintenance mode just before patching and end once server has rebooted and finished its patch.

I think this can be achieved via API, however as i have never used or setup API integration before in Dynatrace just wondered if has anyone know the basic steps or advice on how to setup this. Or a better alterative way than API to achieve this?

 

Thanks in advance for your support. 

 

 

 

4 REPLIES 4

rastislav_danis
DynaMight Pro
DynaMight Pro

You can try this:

setup all time maintenance window for whole environment just for entities tagged with some specific tag, f.e. "PatchMaint".

On host where patching is to be performed, use command line to setup tag: .\oneagentctl.exe --set-host-tag=PatchMaint

After patching is done and server reboots, run tag removal from that host: .\oneagentctl.exe --remove-host-tag=PatchMaint

 

Alanata a.s.

I think this is the most simple and effective solution for this case.

You will need to access the host to apply the patching anyway (manually or thru automation), so you just need to include the commands to add/remove the tag before and after the patching process.

Great solution, @rastislav_danis 👏

Site Reliability Engineer @ Kyndryl

p_devulapalli
Leader

@JordanGreen You can use workflows as an option to send a HTTP request to the API. Settings API is the one you should be using and the parameters that needs to be included are listed below

https://docs.dynatrace.com/docs/shortlink/api-v2-settings-get-schemas-builtin-alerting-maintenance-w...

https://docs.dynatrace.com/docs/shortlink/api-v2-settings-post-object

 

Phani Devulapalli

Maheedhar_T
Mentor

Hi @JordanGreen ,
As @p_devulapalli  mentioned above, you can use API to post maintenance windows to Dynatrace but however there's a catch here.
If you want to do this host-wise you need to provide the Host-ID as in Dynatrace, not the hostname. 
example:
"scope": {
"entities": [
"HOST-1A2B3C4E5F6G7H8I"
]
Assuming you're sending this API from somewhere outside of dynatrace, you'll not have this Id.

Other alternative is to tag the entities or use ManagementZone filter.


Regards,
@Maheedhar_T 

Maheedhar

Featured Posts