Use-case: I have a cron that switches between in/out depending on time of day. However, if I am on an extended vacation, I want it to be in out mode without switching to in. There are may ways to accomplish this, but the neatest way is to create a new running state called vacation and if its set, cron will not switch states unless I switch it back. Then I don't need any external files to manage and I can switch to/from vacation mode within the ZM interface, even while on travel. This is useful because I might forget to set 'vacation mode' and then when on travel, I log into ZM and enable 'vacation' mode run state and my cron will know not to switch. Using external mechanisms will mean I need to open another point of access to my linux box.
I took a look directly at the DB records and did not find any such data that is maintained (it does maintain a list of states, but not current running state)
I thought about checking the state of every individual monitor in my cron script and map it to a running state, but that won't really work because my 'vacation' state is the same as 'out'
Code: Select all
mysql> select * from States;
+----------+---------------------------------------------------------+
| Name | Definition |
+----------+---------------------------------------------------------+
| in | 4:Nodect:1,5:Nodect:1,8:Nodect:0,9:Nodect:1,10:Nodect:0 |
| out | 4:Nodect:1,5:Nodect:1,8:Nodect:0,9:Nodect:1,10:Nodect:1 |
| vacation | 4:Nodect:1,5:Nodect:1,8:Nodect:0,9:Nodect:1,10:Nodect:1 |
+----------+---------------------------------------------------------+