saltstack-formulas/zabbix-formula — pull request #8 by moreda (2014-12-30 00:58:44+00:00)
Title: Improved doc and simplified configuration

This set of commits are related to the comments that I wrote in 214189f. After writing the initial zabbix-formula, I lost track of a few commits. At this moment I think it's better to propose these changes (which undo some of the changes already commited by other members of the team) and, after receive some feedback, hopefully commit then :-)

Even at the risk of being repetitive, as I commented in 214189f:

* I think that *mapping all (or most of) the possible values of a key:value configuration file into pillars in a formula has to be carefully considered* because it introduces more lines, more maintenance and fuss, defeating the main purpose of the formula: simplicity for the most frequent cases and base for further private customisation.

* I don't think that some of the "pillarized" values will be really set with a different value than the default ones in most of cases. Moreover, this strategy leads to key:values in the configuration file that could not be valid for some version of Zabbix (i.e. all the VMware stuff for 2.0.x). In my opinion, the formula should be adapted to complex cases through override of templates and even state files. If not like that, we can end up with a over-complex formula not so really useful and hard to understand. Just as an example, the `pillar.example`section for zabbix server would be something like this:
```
zabbix-server:
listenip: 0.0.0.0
listenport: 10051
dbhost: localhost
dbname: zabbix
dbuser: zabbixuser
dbpass: zabbixpass
startipmipollers: 0
startpollersunreachable: 1
starttrappers: 5
startpingers: 1
startdiscoverers: 1
starthttppollers: 1
starttimers: 1
javagatewayport: 10052
startjavapollers: 0
startvmwarecollectors: 0
vmwarefrequency: 60
vmwarecachesize: 8M
snmptrapperfile: /tmp/zabbix_traps.tmp
startsnmptrapper: 0
housekeepingfrequency: 1
maxhousekeeperdelete: 500
senderfrequency: 30
cachesize: 8M
cacheupdatefrequency: 60
startdbsyncers: 4
historycachesize: 8M
trendcachesize: 4M
historytextcachesize: 16M
valuecachesize: 8M
nodenoevents: 0
nodenohistory: 0
timeout: 3
trappertimeout: 300
unreachableperiod: 45
unavailabledelay: 60
unreachabledelay: 15
startproxypollers: 1
proxyconfigfrequency: 1
proxydatafrequency: 1
```
instead of the current:
```
zabbix-server:
listenip: 0.0.0.0
listenport: 10051
dbhost: localhost
dbname: zabbix
dbuser: zabbixuser
dbpass: zabbixpass
extra_conf: |
# Here we can set extra server configuration lines
```
I honestly think that the second is less scary :-)

* CamelCase notation is not usual in SaltStack/Python/YAML. Yes, it's like that in Zabbix configuration files but e.g. `zabbix-server:HistoryTextCacheSize` is a SaltStack/Python/YAML compound of keys that maps into `HistoryTextCacheSize` Zabbix parameter.

Cheers,

Roberto