Ad Widget

Collapse

Set Maintenance remotely

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rangeshgupta
    Junior Member
    • May 2010
    • 21

    #1

    Set Maintenance remotely

    We have cluster, which is used by user's for running the jobs. When server are idle we make them shut down and start when there is a job in a queue

    So, the state change of the servers are automated.

    It would be very useful if I can add to script a command to enable maintenance before shutting down the server. And disabled the maintenance while starting the server.

    Is there is a way to do that.

    Thanks
  • ruswold
    Senior Member
    • Mar 2010
    • 210

    #2
    Originally posted by rangeshgupta
    We have cluster, which is used by user's for running the jobs. When server are idle we make them shut down and start when there is a job in a queue

    So, the state change of the servers are automated.

    It would be very useful if I can add to script a command to enable maintenance before shutting down the server. And disabled the maintenance while starting the server.

    Is there is a way to do that.

    Thanks
    For disable monitoring (set status not monitored) exec sql query
    update hosts set status = 1 where host = HOSTNAME

    to unable monitoring: update hosts set status = 0 where host = HOSTNAME

    Comment

    • dpbaker57
      Member
      • Aug 2010
      • 33

      #3
      Help for those of us who are SQL challenged.

      Originally posted by ruswold
      For disable monitoring (set status not monitored) exec sql query
      update hosts set status = 1 where host = HOSTNAME

      to unable monitoring: update hosts set status = 0 where host = HOSTNAME
      This would be great if I knew how to set up the SQL connection and could code the change.

      I need to script like this for our java code deployments, temporarily disabling website monitors. The releases are already mostly scripted in windows command (.bat). I also need this when rebooting to apply Windows updates, temporarily disabling host monitors. I guess I will have to run a script on each boot to re-enable monitoring. Most of the people doing the updates are unfamiliar with Zabbix except for the generated alerts.

      Comment

      Working...