Has anyone used powershell or command line action script to put one or more Servers into or out of maintenance mode?
Our customer has a number of machines that have flexible shutdown times, so a static blackout period is not an option.
Is it plausible to run a script from a hub to set times for in and out for one or more servers?
Many thanks in advance for any help.
So as of UIM 8.X there are two maintenance modes.
The first is the old controlled by the controller on each robot.
You can use the following command to set this one
Run command (that should have stopped the monitoring for 10 hours)
<nimsoft>\bin\pu.exe -u administrator -p 'password' /domain/hub/robot/controller maint_until "" "36000" Reason for Outage" ""
This disables all probes on the robot except the controller and re-enables them after the time period.
The problem with this is that things such as logmon and ntevl that store a file position will pick up right were they left off.
This can be a problem for some.
The other is done through NAS and USM with the new maintenance mode:
Perform Ad Hoc Maintenance - CA Unified Infrastructure Management - 8.0 - CA Technologies Documentation
The new method can only be accessed via web either through USM portlet or rest API call.
Advanced users who do not use USM can use REST-based web service calls to add or modify maintenance windows for devices. The following calls are available:
See the CA Nimsoft RESTful Web Services Guide for more information about using RESTful Web Services.
Hope this helps
Many thanks for this. We will test to see if this can be scripted securely from a client-side request, as in they write and run the script.
That's what testing is for!
I will try and post feedback.
Can I use the same syntax to a linux machine?
e.g.: /opt/nimsoft/bin/pu -u administrator -p 'password' /domain/hub/robot/controller maint_until "" "36000" Reason for Outage" ""
I don't foresee any problems using the same syntax on Linux.