I have this document http://docs.nimsoft.com/prodhelp/en_US/Monitor/SDK/REST/Nimsoft%20RESTful%20Webservices%20Manual%20and%20Reference%20Gui…
that shows me the different REST API Calls and examples with them.
I do not see a call or an example of stopping the watcher service and disabling it? I am looking to automate this in our server decommission process. Is there a way to do this with the REST Webs services API?
Currently there is nothing currently built in to allow this.
One way you might be able to do this is to deploy the nexec probe to a robot with a pre-configured profile
to stop the robot service.
then use the rest api probe call back to active the profile.
there would be no way to start it back up though.
Well all I need to do is disable it. Because the server is being decommissioned. However sometimes during this process it will get rebooted a few times, and if the robot has been removed from UIM but the service is not stopped it will show back up in the IM and start to alert when its powered off again.
I think it would be faster to login and disable the service than it would be to script anything or install a probe to do the work for you in the use case you described.
If i was to set a profile in the nexec probe to stop and disable the service which I know I can do and placed it on the robots so it was there. Could I than run that profile from the nexec probe on any robot from the Webservices API?
you would need to the the rest probe call back to set the profile to active
Probe Calls - CA Unified Infrastructure Management Probes - CA Technologies Documentation
and then use the call back to deactivate the probe and then activate it.
would be a three steps process.
but yes if each robot had the require nexec and script on it then you would be able to run the above command for that robot.
Gene why would I need to mark it active and than deactivate and re-activate? Could I not just set a schedule for that profile to run every say 1 minute. That way when its activated a minute later the probe would run the profile and the robot service would become disabled?
HI, yea I had not thought about that. but I would think that would work as well.
We addressed this by creating an archive package with nothing in it but two tabs, windows and linux filters on OS. the post install command on each is, respectively
sc config "NimbusWatcherService" start= disabled & sc stop "NimbusWatcherService"
( /opt/nimsoft/bin/niminit stop ; /opt/nimsoft/bin/inst_init.sh remove )
Then you can use REST to deploy the package to the desired robot you want to disable.
Works too well so be careful. You get that disgruntled or careless employee that drops this at the domain level in IM and you're toast - one can only hope that the system with distsrv on it gets terminated early in the process or you have a lot of work to do to clean up.
Right that makes sense, I believe I have everything configured correctly accept the actual rest part. Right now using examples that are up from here:
and Python scripts that have been tweaked for our environment I have them working like maintenance mode and probe inventory etc. I however have not been able to find an actual working example of how someone has used the rest API with the Set Single Probe Configuration Value. In the python examples I have from what has been created there is a function for "GET SINGLE Probe Configuration Value, however not one for SET Probe Configuration Value". So I am still working to try and create something so I can get this to work to where I can deploy the package.
Do you possibly have an example powershell script or python script etc. for the "SET SINGLE prove configuration value" for the REST API Webservices of UIM?
I don't have anything in Perl or REST as an example but here's the Windows command line version of the controller callback:
bin\pu.exe -u USERNAME -p PASSWORD controller probe_config_set ntperf "/watchers/WatcherName" "active" "no" ""
You should be able to fire tht callback using:
/opt/nimsoft/bin/niminit stop ; /opt/nimsoft/bin/inst_init.sh remove
The first command you gave does work the second does not for us in RHEL. Is there a command to disable the nimbus service in RHEL?
Can check with below command
initctl stop nimbus
/etc/init.d/nimbus is what stops the service however when running the command by hand I need to sudo in order to run it.
That being said if I use the nexec probe I get this error: "Failed to stop nimbus.service: Interactive authentication required.See system logs and 'systemctl status nimbus.service' for details."
So I am not quite sure how I can run this or what user actually runs the command to add it to a sudoers list?? Or any other suggestions would be welcome as well .