Ad Widget

Collapse

Creating maintenance mode without Admin

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xaeth
    Member
    • Nov 2004
    • 67

    #1

    Creating maintenance mode without Admin

    Hi all. So i wanted to run a concept by others to see if it was just completely off the wall, or if someone has already seen similar that my own searches haven't turned up.

    Goal
    Provide a means for generating for maintenance mode to be enabled on a host without direct web/api access. The main reason is that we have lots of Users in Zabbix that are root on their monitored hosts. Obviously for Admin users this would have minimal benefit.

    Background
    We were having a discussion internally and decided that since we already have a tool that handles maintenance mode for our nodes with our load balancers that it would be awesome if it could also handle Zabbix.

    We accomplish this with an app called Plight which is mainly just a light weight web server. As an aside, I'm working on a refactor to support additional states so watch for the upcoming v0.1.0 release if this interests you.

    Plans
    Before i started building the bits in Zabbix my thought was to just have all the triggers depend on the 'maintenance mode' trigger, but this actually seems like a really bad expectation that would be hard to maintain and enforce everywhere.

    Now that I've got a template started that does most of what I would want I've realized that I'd probably be better off leveraging the custom media types. I would create a script that would take a basic action with relevant data and generate an on the fly maintenance window for the host. A resolve action would remove the window if it occurred before the window closed on its own.

    The information i'd pass in the body of the action to the script would be fairly basic. The host itself, and a macro defined for duration. I could leave the duration out and just go with a default value, but I figure if I'm setting a default it may as well be override-able.

    Re-use
    Another thing I was considering was just wrapping ansible's zabbix_maintainence module to accomplish the above, and I still may.

    I'm curious what other people's thoughts are and would love to hear questions or suggestions. I've added a poll here to match the poll I posted to G+ about this same topic.
    1
    Seems wasteful/pointless
    100.00%
    1
    I've seen it (please tell me where!)
    0.00%
    0
    Sounds reasonable
    0.00%
    0
    Sounds reasonable, can i use it too?
    0.00%
    0
Working...