Scheduling node restarts via script or right clicking on the node?

Started by SpotTheCat, July 23, 2021, 03:49:04 PM

Previous topic - Next topic

SpotTheCat

Hi,

We have a lot of Windows nodes that we manage. We have a custom DCI that shows when the servers a waiting for a reboot. Ideally we'd like to be able to right click on the server and add a scheduled task to reboot the servers. However I can't find any functions in nxsl and I don't think it's possible to write a script for nxshell to run the at command. So I'm wondering if I've missed something in the documentation that would allow us to do this?

We have a library script that reboots a node and we can call this from the scheduled tasks. This works fine but adding a lot of nodes manually takes a lot of time and inevitably ends up with the odd typo.

Kind regards

Spot

Filipp Sudanov

Scheduling tasks is currently not possible from NXSL. But should be possible using nxshell, because nxshell allows to do anything what desktop client can. 

So the sequence can be
Object tool that runs NXSL script
NXSL script creates an event
EPP has rule for that event, that runs "execute command on management server" action
the action runs nxshell command

I can prepare the actual nxshell script example a bit later.

Victor Kirhenshtein

Another option is to generate special event from NXSL script, and in event processing policy execute restart action for that event.

Best regards,
Victor