DX Infrastructure Management

Maintenance Mode via command line 2.6 (rest api) 

Jan 07, 2016 07:31 AM

The attached tool makes it possible to put servers in maintenance mode via a command line tool (via REST API calls)

- list defined calendars

- list servers/devices in maintenance

- add server(s) in existing calendar (with server name)

- define calendar and add servers, with the server name, directly in this new calendar

- put an USM group into maintenance

- list empty calendars

- delete empty calendars

- list expired calendars

- delete expired calendars

- remove servers from maintenance

 

Doc file is included.

Prereq: this tool uses the webservices_rest probe that must be deployed to your UMP server.

 

All remarks or ideas are very  welcome

 

note: Perl source and compiled version are included

 

Version 2.2:

- add USM group in maintenance

-  add regex selection of robots in maintenance

- delete empty and/or expired calendars (only for MSSQL, if anybody with MySQL skills could translate them?)

- tested and compiled on Centos7 & Windows 2012

Version 2.4:

- UMP/Rest http or https

- add with(nolock) in sql queries

- correct sql query to select USM groups

Version 2.5:

- remove servers from maintenance (in regex format)

- a server that has multiple entries in the discovery tab (mutiple cs_ids) will have all entries added in maintenance

tested on UIM 9.0.2 windows

Version 2.6:

- option -ir"regex" makes it possible to set devices in maintenance based on the cm_computer_system table.  So you can put devices in maintenance that are not a robot.

Statistics
0 Favorited
30 Views
1 Files
0 Shares
9 Downloads
Attachment(s)
zip file
nimsoft_rest_maintenance_2.6.zip   26.15 MB   1 version
Uploaded - May 29, 2019

Related Entries and Links

No Related Resource entered.