GithubHelp home page GithubHelp logo

emattiza / zabbix-formula Goto Github PK

View Code? Open in Web Editor NEW

This project forked from saltstack-formulas/zabbix-formula

0.0 3.0 0.0 2.52 MB

Home Page: http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html

License: Other

SaltStack 19.77% HTML 80.23%

zabbix-formula's Introduction

zabbix-formula

A saltstack formula to manage Zabbix.

This formula has been developed distributing declarations in different files to make it usable in most situations. It should be useful in scenarios ranging from a simple install of the packages (without any special configuration) to a more complex set-up with different nodes for agent, server, database and frontend.

Customization

First, see if providing pillar data is enough for your customization needs. That's the recommended way and should be enough for most cases. See that sometimes there's a key named extra_conf that's used to add arbitrary configuration lines in the templates provided.

When providing pillar data is not enough for your needs, you can apply the Template Override and Files Switch (TOFS) pattern as described in the documentation file TOFS_pattern.md.

The formula is designed to be independent from other formulas so you could use this in a non-100% salted environment (i.e. it's not required –although recommended– to use other formulas to provision other parts of a complete system).

Using RedHat EPEL repo Zabbix packages

If you want to use the EPEL repo packages, as the naming conventions are different, you need to tweak the default values of map.jinja to obtain the desired results. In short:

  • Don't use the zabbix.agent.repo sls assuming that EPEL repos are already configured
  • Override the map.jinja definitions using pillar values like this
zabbix:
  lookup:
    agent:
      pkg: zabbix22-agent
    server:
      pkg: zabbix22-server-mysql

Now you just have to use zabbix.agent.conf sls file and that's it.

Example of usage

Just as an example, this is a top.sls file to install a complete modular self-contained Zabbix system:

base:
  '*':
    - zabbix.agent.repo
    - zabbix.agent.conf

    - mysql.server.conf
    - mysql.client.conf
    - zabbix.mysql.conf
    - zabbix.mysql.schema

    - zabbix.server.repo
    - zabbix.server.conf

    - nginx.conf

    - php.fpm.repo
    - php.fpm.conf
    - php.fpm.mysql
    - php.fpm.bcmath
    - php.fpm.mbstring
    - php.fpm.gd
    - php.fpm.xml
    - php.fpm.opcache

    - zabbix.frontend.repo
    - zabbix.frontend.conf

You need the appropriate mysql, nginx and php formulas to complete the installation with this top.sls file.

Note

See the full Salt Formulas doc.

Available states

zabbix.agent

Installs the zabbix-agent package and starts the associated zabbix-agent service.

zabbix.agent.conf

Configures the zabbix-agent package.

zabbix.agent.repo

Configures official Zabbix repo specifically for the agent. Actually it just includes zabbix.repo and adds a requisite for the pkg state declaration

zabbix.frontend

Installs Zabbix frontend.

zabbix.frontend.conf ----------------------

Configures the zabbix-frontend package. Actually you need to use other formulas for apache/nginx and php5-fpm to complete a working setup.

zabbix.frontend.repo ----------------------

Configures official Zabbix repo specifically for the frontend. Actually it just includes zabbix.repo and adds a requisite for the pkg state declaration.

zabbix.mysql.conf ----------------

Creates database and mysql user for Zabbix.

zabbix.mysql.schema ---------------------

Creates mysql schema for Zabbix.

zabbix.pgsql.conf ----------------

Creates database and PostgreSQL user for Zabbix.

zabbix.pgsql.schema ---------------------

Creates PostgreSQL schema for Zabbix.

zabbix.repo

Configures official Zabbix repo.

zabbix.server

Installs the zabbix-server package and starts the associated zabbix-server service.

zabbix.server.conf

Configures the zabbix-server package.

zabbix.server.repo

Configures official Zabbix repo specifically for the server. Actually it just includes zabbix.repo and adds a requisite for the pkg state declaration

zabbix.users

Declares users and groups that could be needed in other formulas (e.g. in the users formula to make an user pertain to the service group).

zabbix-formula's People

Contributors

moreda avatar landergate avatar hatifnatt avatar aboe76 avatar bkmit avatar ninjix avatar noelmcloughlin avatar nmadhok avatar 0xf10e avatar whiteinge avatar xfxian avatar syphernl avatar jzandbergen avatar timwsuqld avatar goir avatar 1exx avatar asenci avatar iggy avatar mchugh19 avatar gravyboat avatar t0fik avatar unsupo avatar techhat avatar lmf-mx avatar mikemol avatar pauldalewilliams avatar tomduijf avatar wwentland avatar edusperoni avatar puneetk avatar

Watchers

James Cloos avatar Evan Mattiza avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.