DX Unified Infrastructure Management

 View Only
Expand all | Collapse all

Maintenance Mode via command line 2.7.1 (rest api)

  • 1.  Maintenance Mode via command line 2.7.1 (rest api)

    Posted Nov 14, 2019 06:28 AM
    Edited by Luc Christiaens Jul 04, 2022 04:11 AM
      |   view attached

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

    Version 2.7.1:
    - -ly: list expired schedules
    - dy: delete expired schedules
    - add parameter sql_driver in nimsoft_generic.dat so that its possible to install and reference "ODBC Driver 17 for SQL Server" that is compatible with TLS 1.2
    - tested with 9.2.0

    Version 2.7.2:
    - tested with 20.1
    - the parameter verification for regex selection was too strict

    Version 2.7.4:
    - tested with 20.3.3
    - several new parameters are added so you can define recurring schedules
    - with the parameter -ap you can select the usage of UIMAPI or the old Rest interface (default uimapi)


    #uim #commandline #tool #maintenance #device #calendar #report #perl

    ​​​​​​​​

    Attachment(s)



  • 2.  RE: Maintenance Mode via command line 2.7.1 (rest api)
    Best Answer

    Broadcom Employee
    Posted Nov 14, 2019 08:00 AM
    thanks for sharing

    ------------------------------
    Gene Howard
    Principal Support Engineer
    Broadcom
    ------------------------------



  • 3.  RE: Maintenance Mode via command line 2.7.1 (rest api)

    Posted Feb 19, 2020 09:46 AM
    Hello Luc, where is the script? I don't see it attached.

    ------------------------------
    Daniel Blanco
    Enterprise Tools Team Architect
    DBlanco@alphaserveit.com
    ------------------------------



  • 4.  RE: Maintenance Mode via command line 2.7.1 (rest api)

    Posted Feb 19, 2020 03:26 PM
    Shows up for me at the bottom of his post and there is also a View Attachment link at the top. 


    ------------------------------
    Support Engineer
    Broadcom
    ------------------------------



  • 5.  RE: Maintenance Mode via command line 2.7.1 (rest api)

    Posted Nov 26, 2020 10:42 AM
    Hello, I dont see it attached, where can I download this useful script?




  • 6.  RE: Maintenance Mode via command line 2.7.1 (rest api)

    Posted Nov 26, 2020 11:15 AM
    Strange, with me it show displayed; are you logged on?
    show_download



  • 7.  RE: Maintenance Mode via command line 2.7.1 (rest api)

    Posted Nov 27, 2020 06:28 AM
    Hi!
    Didnt see it either..



  • 8.  RE: Maintenance Mode via command line 2.7.1 (rest api)

    Posted Nov 27, 2020 06:43 AM
    And if you do a search on: nimsoft_rest_maintanance_2.7.2.zip ?


  • 9.  RE: Maintenance Mode via command line 2.7.1 (rest api)

    Posted Nov 27, 2020 06:51 AM
    Hi!
    Well ... nope..... got it... well strange now I see the attached File, didnt do anything different as moments ago, as I posted the screenshot :-)

    Thanks a lot
    cheers
    Matthias


  • 10.  RE: Maintenance Mode via command line 2.7.1 (rest api)

    Posted Nov 27, 2020 07:01 AM
    Thank you very much to all, now I can download it, Im logged of course, its strange! But finally, I able to download the file,
    best regards!


  • 11.  RE: Maintenance Mode via command line 2.7.1 (rest api)

    Posted May 21, 2021 03:56 AM
      |   view attached
    Attachment for version 2.7.4 (if the attachment is not visible in this post you can search on: nimsoft_rest_maintenance_2.7.4.zip)
    - tested with 20.3.3
    - several new parameters are added so you can define recurring schedules
    - with the parameter -ap you can select the usage of UIMAPI or the old Rest interface (default uimapi)

    Attachment(s)