From 633c3a30fc254fa698625b1fe155a9ca4432a5bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20MOHIER?= Date: Mon, 3 Sep 2018 17:03:50 +0200 Subject: [PATCH] Update for Alignak version 2.0 --- README.rst | 541 ++++++--------- alignak_demo/docs/alignak_backend.rst | 201 ++++++ alignak_demo/docs/graphite.rst | 340 ++++++++++ alignak_demo/etc/alignak-backend-import.cfg | 63 -- alignak_demo/etc/alignak-logger.json | 70 ++ alignak_demo/etc/alignak-new.cfg | 31 + alignak_demo/etc/alignak.cfg | 14 +- alignak_demo/etc/alignak.ini | 712 +++++++++++++++++--- 8 files changed, 1443 insertions(+), 529 deletions(-) create mode 100644 alignak_demo/docs/alignak_backend.rst create mode 100644 alignak_demo/docs/graphite.rst delete mode 100755 alignak_demo/etc/alignak-backend-import.cfg create mode 100644 alignak_demo/etc/alignak-logger.json create mode 100755 alignak_demo/etc/alignak-new.cfg diff --git a/README.rst b/README.rst index 1815b24..0cd69d0 100644 --- a/README.rst +++ b/README.rst @@ -12,6 +12,9 @@ This repository contains many stuff for Alignak: - scripts to run the Alignak daemons for the demo server (may be used for other configurations) +All the procedures in this document are existing in the Alignak documentation which is available on `Read The Docs `_. The aim of this document is simply to contain a simple and easy procedure to set-up a standard configuration demonstrating what Alignak is capable of. + + What's behind the demo server ============================= @@ -34,17 +37,21 @@ To set-up this demo, you must: The monitored configuration --------------------------- +Some explanations about the hosts, services that will be monitored ... + On a single server, the monitored configuration is separated in four **realms** (*All*, *North*, *South* and *South-East*). Some hosts are in the *All* realm and others are in the *North* and *South* realm, both sub-realms of *All* realm. The *South-East* realm is a sub-realm of *South* and it also contains some hosts. -The *All* realm is (let's say...) a primary datacenter where main servers are located. *North* and *South* realms are a logical group for a part of our monitored configuration. They may be seen as secondary sites. +To explain shortly the *realm* concept, the *All* realm is (let's say...) a primary datacenter where main servers are located. *North* and *South* realms are logical groups for a part of our monitored configuration. They may be seen as secondary sites or datacenters. According to Alignak daemon logic, the master Arbiter dispatches the configuration to the daemons of each realm and we must declare, for each realm: - a scheduler - a broker - a poller -- a receiver (not mandatory but we want to have NSCA collector) +- a receiver (not mandatory but we want to have an NSCA collector) + +Some other configuration is possible but we will make it simple for this simple demo;) In the *All* realm, we find the following hosts: @@ -56,87 +63,138 @@ In the *North* realm, we find some passive hosts checked thanks to NSCA. In the *South* realm, we find some other hosts. -Requirements ------------- +Setting-up the demo +=================== -Mandatory requirements -~~~~~~~~~~~~~~~~~~~~~~ -You will need some requirements for setting-up this demonstration: -:: +We recommend having an up-to-date system:: - # Update your server sudo apt-get update sudo apt-get upgrade - # Install git and python - sudo apt-get install git - sudo apt-get install python2.7 python2.7-dev python-pip +We also recommend using the most recent `pip` utility:: - # Needed for the PyOpenSSL / Cryptography dependencies of Alignak - sudo apt-get install libffi-dev libssl-dev + sudo pip install --upgrade pip -Optional requirements -~~~~~~~~~~~~~~~~~~~~~ -The scripts provided with this demo use the `screen` utility found on all Linux/Unix distro. As such:: +1. Get base components +---------------------- - sudo apt-get install screen +**Note** that all the Alignak components need a root account (or *sudo* privilege) to get installed. -Some screen hint and tips: +Alignak framework +~~~~~~~~~~~~~~~~~ :: - # Listing the active screens - screen -ls + # Add the Alignak repositories to the system source (stable and develop releases) + sudo echo deb https://dl.bintray.com/alignak/alignak-deb-stable xenial main | sudo tee -a /etc/apt/sources.list.d/alignak.list + sudo echo deb https://dl.bintray.com/alignak/alignak-deb-testing xenial main | sudo tee -a /etc/apt/sources.list.d/alignak.list - # Joining a screen - screen -r alignak-backend + # Add Alignak repositories GPG key + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv D401AB61 +sudo /usr lo + # Update packages cache + sudo apt-get update - # Leaving a screen (without killing it) - screen -r alignak-backend - Ctrl a+d + # Install most recent Alignak version + sudo apt install alignak + # Alignak default configuration files are copied to /usr/local/share/alignak - # Switching between active screens - Ctrl a+n + # Execute Alignak post-installation script (create user account and install Python libraries) + sudo /usr/local/share/alignak/post-install.sh -**Note**: *It is not mandatory to use the provided scripts, but it is more simple for a first try;)* + # Run a default configuration verification + alignak-arbiter -V -e /usr/local/share/alignak/etc/alignak.ini +.. warning:: if an error is raised during the configuration verification, your current logged-in user account is probably not authorized to write the pid file in the working directory. You should add your user account to the ``alignak`` group created by the post installation script: ``usermod -a -G alignak my_account`` -Setting-up the demo -=================== +Alignak monitored configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -We recommend having an up-to-date system;) -:: +Obviously, the default shipped configuration do not contain much hosts to check! Indeed, the default configuration do not include any host at all! So, now, we will start adding some hosts to be monitored by Alignak. - sudo apt-get update - sudo apt-get upgrade +Run the configuration verification one more time and examine the console output. Some noticeable log:: -We also recommend using the most recent `pip` utility. On many distros pip is currently available as version 8 whereas the version 9 is available: -:: + # Run a default configuration verification + alignak-arbiter -V -e /usr/local/share/alignak/etc/alignak.ini + ... + [2018-06-28 19:17:31] WARNING: [arbiter-master.alignak.daemon] - No Nagios-like legacy configuration files configured. + [2018-06-28 19:17:31] WARNING: [arbiter-master.alignak.daemon] - If you need some, edit the 'alignak.ini' configuration file to declare one or more 'cfg=' variables. + ... + [2018-06-28 19:17:31] INFO: [arbiter-master.alignak.objects.config] - creating 'host' objects + [2018-06-28 19:17:31] INFO: [arbiter-master.alignak.objects.config] no host objects in the configuration - sudo pip install --upgrade pip +To start with a very simple configuration, we will only monitor one host using a fake internal check that makes this host always being considered as **UP**. The default installation script copied a very simple Nagios legacy configuration in the */usr/local/share/alignak/etc* directory:: -1. Get base components ----------------------- + # Edit the alignak.ini file to declare a Nagios legacy configuration + sudo vi /usr/local/share/alignak/etc/alignak.ini + cfg=alignak.cfg -**Note** that all the Alignak components need a root account (or *sudo* privilege) to get installed. +This will make the Alignak arbiter open and parse the configuration declared in the *alignak.cfg* file located in the same directory as the *alignak.ini* configuration file. -Alignak framework -~~~~~~~~~~~~~~~~~ -:: +.. warning:: using the default shipped configuration files is rarely a good idea! When you will update Alignak for a more recent version, these files will be replaced with the most recent versions delivered with the update! On a production server **you must use your own configuration** located in (per example) */usr/local/etc/alignak* or */etc/alignak* - mkdir ~/repos - cd ~/repos +Run a new configuration verification and examine the console output. Some noticeable log:: - # Alignak framework - git clone https://github.com/Alignak-monitoring/alignak - cd alignak - # Install alignak and all its python dependencies - # -v will activate the verbose mode of pip (not mandatory...) - sudo pip install -v . + # Run a default configuration verification + alignak-arbiter -V -e /usr/local/share/alignak/etc/alignak.ini + ... + +Run the configuration verification one more time and examine the console output. Notice that the previous warning disappeared and that Alignak detected 8 hosts to monitor:: + + # Run a default configuration verification + alignak-arbiter -V -e /usr/local/share/alignak/etc/alignak.ini + ... + [2018-06-28 19:29:09] INFO: [arbiter-master.alignak.objects.config] - creating 'host' objects + [2018-06-28 19:29:09] INFO: [arbiter-master.alignak.objects.config] created 8. + ... + [2018-06-28 19:48:06] INFO: [arbiter-master.alignak.objects.config] Checking hosts... + [2018-06-28 19:48:06] INFO: [arbiter-master.alignak.objects.config] Checked 1 hosts + +.. note:: indeed Alignak created 8 hosts and hosts templates, but it will really monitor 1 host... this is what the log is meaning! + +.. tip:: running the same verification command with the ``-vv`` option will produce a verbose log with many information about the configuration parsing and loading. + +Starting Alignak +~~~~~~~~~~~~~~~~ + +Now that we have something to monitor, let's start monitoring:: + + # Enable Alignak on system start + sudo systemctl enable alignak.service + + # Start Alignak daemons system services + sudo systemctl start alignak.service + + # View the Alignak process tree + ps -faux | grep alignak + alignak 3264 0.5 4.0 985536 41224 ? Sl 19:36 0:00 alignak-receiver receiver-master + alignak 3271 0.0 3.8 173744 39100 ? S 19:36 0:00 \_ alignak-receiver receiver-master + alignak 3266 1.6 4.1 986092 41788 ? Sl 19:36 0:01 alignak-broker broker-master + alignak 3277 0.0 3.8 173760 39076 ? S 19:36 0:00 \_ alignak-broker broker-master + alignak 3269 0.9 4.1 985804 41740 ? Sl 19:36 0:00 alignak-poller poller-master + alignak 3279 0.0 3.8 173732 39044 ? S 19:36 0:00 \_ alignak-poller poller-master + alignak 3493 0.0 4.0 985804 40668 ? S 19:36 0:00 \_ alignak-poller-master worker fork_1 + alignak 3270 1.1 4.1 986776 42308 ? Sl 19:36 0:00 alignak-scheduler scheduler-master + alignak 3280 0.0 3.8 174004 38644 ? S 19:36 0:00 \_ alignak-scheduler scheduler-master + alignak 3273 1.4 4.1 987208 42592 ? Sl 19:36 0:01 alignak-arbiter arbiter-master + alignak 3283 0.0 3.8 173800 39252 ? S 19:36 0:00 \_ alignak-arbiter arbiter-master + alignak 3275 0.9 4.0 985808 41640 ? Sl 19:36 0:00 alignak-reactionner reactionner-master + alignak 3284 0.0 3.8 173736 38968 ? S 19:36 0:00 \_ alignak-reactionner reactionner-master + alignak 3494 0.0 3.9 985808 40588 ? S 19:36 0:00 \_ alignak-reactionner-master worker fork_1 + + # Check Alignak daemons are up and running (get daemon identity) + curl http://127.0.0.1:7768 + curl http://127.0.0.1:7769 + curl http://127.0.0.1:7770 + curl http://127.0.0.1:7771 + curl http://127.0.0.1:7772 + curl http://127.0.0.1:7773 + + # Tail Alignak events log + tail -f /usr/local/var/log/alignak/alignak-events.log + [2018-06-28 19:36:24] INFO: CURRENT HOST STATE: localhost;UP;HARD;0; - # Create alignak user/group and set correct permissions on installed configuration files - sudo ./dev/set_permissions.sh Alignak backend ~~~~~~~~~~~~~~~ @@ -147,26 +205,90 @@ Alignak backend # To allow alignak user to view the log files sudo chown -R alignak:alignak /usr/local/var/log/alignak-backend/ -**Note** that you will need to have a running Mongo database. See the `Alignak backend installation procedure `_ if you need to set one up and running. +**Note** that you will need to have a running MongoDB server. See the `Alignak backend installation procedure `_ if you need to set one up and running. -An excerpt for installing MongoDB on an Ubuntu Xenial: -:: +An excerpt for installing MongoDB on an Ubuntu Xenial:: - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 - echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/testing multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 + echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list sudo apt-get update sudo apt-get install -y mongodb-org - sudo service mongod start - - -An excerpt for installing MongoDB on a debian Jessie: -:: - - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 - echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list - sudo apt-get update - sudo apt-get install -y mongodb-org - sudo service mongod start + sudo systemctl enable mongod.service + sudo systemctl start mongod.service + + +Configuring MongoDB is not mandatory because the Alignak backend do not require any authenticated connection to the database. But if you wish a more secure DB access with user authentication, you must configure MongoDB:: + + mongo + + # Not necessary, but interesting... with the most recent 4.0 version, anew monitoring tool is available;) + > db.enableFreeMonitoring() + { + "state" : "enabled", + "message" : "To see your monitoring data, navigate to the unique URL below. Anyone you share the URL with will also be able to view this page. You can disable monitoring at any time by running db.disableFreeMonitoring().", + "url" : "https://cloud.mongodb.com/freemonitoring/cluster/KAI3EQPMSZHNGDELYLDNA6QVCPZ5IK6B", + "userReminder" : "", + "ok" : 1 + } + + # Create an admin user for the server + > use admin + > db.createUser( + { + user: "alignak", + pwd: "alignak", + roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] + } + ) + + Successfully added user: { + "user" : "alignak", + "roles" : [ + { + "role" : "userAdminAnyDatabase", + "db" : "admin" + } + ] + } + + # Exit and restart the server + Ctrl+C + + # Configure mongo in authorization mode + sudo vi /etc/mongod.conf + security: + authorization: enabled + + # Restart mongo + sudo systemctl restart mongod.service + # As of now, you will need to authenticate for any operation on the MongoDB databases + + mongo -u alignak -p alignak + > show dbs + admin 0.000GB + config 0.000GB + local 0.000GB + + + > use alignak + > db.createUser( + { + user: "alignak", + pwd: "alignak", + roles: [ "readWrite", "dbAdmin" ] + } + ) + + Successfully added user: { "user" : "alignak", "roles" : [ "readWrite", "dbAdmin" ] } + + > db.test.save( { test: "test" } ) + # This will create atest collection in the database, which will create the DB in mongo server + + > show dbs + admin 0.000GB + alignak 0.001GB + config 0.000GB + local 0.000GB Alignak backend importation script @@ -273,7 +395,7 @@ As of now, you really installed all the necessary stuff for starting a demo moni The next three chapters explain how to install Alignak modules, checks and notifications for the demo server. -**Note** *because most of the checks packs are able to create the templates, commands,... directly into the Alignak backend during the installation processyou should start the Alignak backend before installing the checks packs and modules ;) See later in this document how to start the Alignak backend...* +**Note** *because most of the checks packs are able to create the templates, commands,... directly into the Alignak backend during the installation process you should start the Alignak backend before installing the checks packs and modules ;) See later in this document how to start the Alignak backend...* To avoid executing all these configuration steps, you can install a all-in-one package that will install all the other packages thanks to its dependencies: :: @@ -904,280 +1026,3 @@ You can edit the *example_*.json* provided files to include your own Graphite / **Note**: `alignak-backend-cli` is coming with the installation of the Alignak backend client. -10. Upgrading -------------- -Some updates are regularly pushed on the different alignak repositories and then you will sometime need to update this demo configuration. Before upgrading the application you should stop Alignak: -:: - - cd ~/demo - # Stop all alignak processes - ./alignak_demo_stop.sh - - # Check everything is stopped - ps -ef | grep alignak- - - # Kill remaining processes. It may happen on a demo server;) - pkill alignak-broker - - -To upgrade Alignak, you can: -:: - - cd ~/repos/alignak - - # Get the last develop version - git pull - - # Install alignak and all its python dependencies - # -v will activate the verbose mode of pip - sudo pip install -v . - - # Create alignak user/group and set correct permissions on installed configuration files - sudo ./dev/set_permissions.sh - - -To upgrade all the alignak packages that were installed, you can: -:: - - pip install -U pip list | grep alignak | awk '{ print $1}' - - -To list the currently installed packages and to know if they are up-to-date, you can use this command: -:: - - pip list --outdated | grep alignak - - -To get the list of outdated packages as a pip requirements list: -:: - - pip list --outdated --format columns | grep alignak | awk '{printf "%s==%s\n", $1, $3}' > alignak-update.txt - -and to update: -:: - - pip install -r alignak-update.txt - - - -What we see? -============ - -Monitored system status ------------------------ - -The `Alignak Web UI `_ running on our demo server allows to view the monitored system status. Have a look here: `http://demo.alignak.net `_. Several login may be used depending on the user role: - -* admin / admin, to get logged-in as an Administrator. You will see all the hosts and will be able to execute some commands (acknowledge a problem, schedule a downtime,...) - -* northman / north, to get logged-in as a power user in the North realm. You will see all the hosts of the All and North realms and will be able to execute commands. - -* southman / south, to get logged-in as a power user in the South realm. You will see all the hosts of the All and South realms and will be able to execute commands. - - -Alignak internal metrics ------------------------- - -Alignak maintains its own internal metrics and it is able to send them to a `StatsD server `_. Install the StatsD server locally (as explained later in this document) and update the `alignak.cfg` configuration file to enable this feature: -:: - - # Export all alignak inner performances into a statsd server. - # By default at localhost:8125 (UDP) with the alignak prefix - # Default is not enabled - statsd_host=localhost - #statsd_port=8125 - statsd_prefix=alignak - statsd_enabled=1 - - -We are running a `demo Grafana server `_ that allows to see the Alignak internal metrics. Several dashboards are available: - -* `Alignak internal metrics `_ shows the statistics provided by Alignak. This sample dashboard is available in the Alignak repository, *contrib* folder. - -* `Graphite server `_ reports on Carbon/Graphite own monitoring. This dashboard is available from the Grafana.net web site. - - - -Installing StatsD / Graphite / Grafana --------------------------------------- - -**NOTE** this section is a draft chapter. Currently the installatin described here is not fully functional ! - -StatsD -~~~~~~ -Install node.js on your server according to the recommended installation process. - -On FreeBSD: -:: - - pkg install node - -On Ubuntu / Debian: -:: - - # For Node.js 6 - curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - - sudo apt-get install -y nodejs - -To get the most recent StatsD (if you distro packaging do not provide it, you must clone the git repository: -:: - - $ cd ~ - $ git clone https://github.com/etsy/statsd - $ cd statsd - - # Create an alignak.js file with the following content (for a localhost Graphite) - $ cp exampleConfig.js alignak.js - $ cat alignak.js - { - graphitePort: 2003 - , graphiteHost: "127.0.0.1" - , port: 8125 - , backends: [ "./backends/graphite" ] - - /* Do not use any StatsD metric hierarchy */ - , graphite: { - /* Do not use legacy namespace */ - legacyNamespace: false - - /* Set a global prefix */ - , globalPrefix: "alignak-statsd" - - /* Set empty prefixes */ - , prefixCounter: "" - , prefixTimer: "" - , prefixGauge: "" - , prefixSet: "" - - /* Do not set any global suffix - , globalSuffix: "_" - */ - } - } - - - # Start the StatsD daemon in a screen - $ screen -S statsd - $ node stats.js alignak.js - # And leave the screen... - $ Ctrl+AD - - # Test StatsD - $ ll /var/lib/graphite/whisper/alignak-statsd/statsd/ - total 84 - drwxr-xr-x 6 _graphite _graphite 4096 févr. 2 20:11 ./ - drwxr-xr-x 3 _graphite _graphite 4096 févr. 2 20:11 ../ - drwxr-xr-x 2 _graphite _graphite 4096 févr. 2 20:11 bad_lines_seen/ - drwxr-xr-x 2 _graphite _graphite 4096 févr. 2 20:11 graphiteStats/ - drwxr-xr-x 2 _graphite _graphite 4096 févr. 2 20:11 metrics_received/ - -rw-r--r-- 1 _graphite _graphite 17308 févr. 2 20:12 numStats.wsp - drwxr-xr-x 2 _graphite _graphite 4096 févr. 2 20:11 packets_received/ - -rw-r--r-- 1 _graphite _graphite 17308 févr. 2 20:12 processing_time.wsp - -rw-r--r-- 1 _graphite _graphite 17308 févr. 2 20:12 timestamp_lag.wsp - - -As of now you have a running StatsD daemon that will collect the Alignak internal metrics to feed Graphite. - -Graphite Carbon -~~~~~~~~~~~~~~~ -:: - - $ sudo su - - $ apt-get update - - # Set TZ as UTC - $ dpkg-reconfigure tzdata - => UTC - - # Install Carbon - $ apt-get install graphite-carbon - - # Configure Carbon - $ vi /etc/default/graphite-carbon - # Enable carbon service on boot - => CARBON_CACHE_ENABLED=true - - # Configuration file - $ vi /etc/carbon/carbon.conf - # Enable log rotation - => ENABLE_LOGROTATION = True - - # Aggregation configuration (default is suitable...) - $ cp /usr/share/doc/graphite-carbon/examples/storage-aggregation.conf.example /etc/carbon/storage-aggregation.conf - - # Start the metrics collector service (Carbon) - $ service carbon-cache start - - # Monitor activity - $ tail -f /var/log/carbon/console.log - - # Test carbon (send a metric test.count) - $ echo "test.count 4 `date +%s`" | nc -q0 127.0.0.1 2003 - $ ls /var/lib/graphite/whisper - => test/count.wsp - -Graphite API -~~~~~~~~~~~~ -No need for the Graphite Web application, we will use Grafana ;) - -:: - - $ sudo su - - # Install Graphite-API - ##### $ apt-get install graphite-api; do not seem to survive a system restart :) - $ wget https://github.com/brutasse/graphite-api/releases/download/1.1.2/graphite-api_1.1.2-1447943657-ubuntu14.04_amd64.deb - $ dpkg -i - - # Install Nginx / uWsgi - $ apt-get install nginx uwsgi uwsgi-plugin-python - - # Configure uWsgi - $ vi /etc/uwsgi/apps-available/graphite-api.ini - [uwsgi] - processes = 2 - socket = localhost:8080 - plugins = python27 - module = graphite_api.app:app - buffer = 65536 - - $ ln -s /etc/uwsgi/apps-available/graphite-api.ini /etc/uwsgi/apps-enabled - $ service uwsgi restart - - # Configure nginx - $ vi /etc/nginx/sites-available/graphite.conf - server { - listen 80; - - location / { - include uwsgi_params; - uwsgi_pass localhost:8080; - } - } - - $ ln -s /etc/nginx/sites-available/graphite.conf /etc/nginx/sites-enabled - $ service nginx restart - -StatsD -~~~~~~ -:: - - To be completed ! - - -Grafana -~~~~~~~ -:: - - # Install Grafana (Version 4 only supported by the Alignak backend!) - wget https://grafanarel.s3.amazonaws.com/builds/grafana_3.1.1-1470047149_amd64.deb - apt-get install -y adduser libfontconfig - dpkg -i grafana_3.1.1-1470047149_amd64.deb - - # Configure Grafana (not necessary...) - $ vi /etc/grafana/grafana.ini - - $ service grafana-server start - - # Open your web browser on http://127.0.0.1:3000 \ No newline at end of file diff --git a/alignak_demo/docs/alignak_backend.rst b/alignak_demo/docs/alignak_backend.rst new file mode 100644 index 0000000..f12a86f --- /dev/null +++ b/alignak_demo/docs/alignak_backend.rst @@ -0,0 +1,201 @@ +Using Alignak backend +##################### + +*REST API and database backend for Alignak* + +Alignak-backend is a database backend for Alignak It may be used: + +* as a configuration repository for the monitored objects + +* as a retention data storage + +* as a live status manager + +* as an interface for the timeseries databases (Graphite, InfluxDB, ...) + +Installing +========== +:: + + # Alignak backend + sudo pip install alignak-backend + # To allow alignak user to view the log files + sudo chown -R alignak:alignak /usr/local/var/log/alignak-backend/ + +**Note** that you will need to have a running MongoDB server. See the `Alignak backend installation procedure `_ if you need to set one up and running. + +An excerpt for installing MongoDB on an Ubuntu Xenial:: + + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 + echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list + sudo apt-get update + sudo apt-get install -y mongodb-org + sudo systemctl enable mongod.service + sudo systemctl start mongod.service + + +Configuring MongoDB is not mandatory because the Alignak backend do not require any authenticated connection to the database. But if you wish a more secure DB access with user authentication, you must configure MongoDB:: + + mongo + + # Not necessary, but interesting... with the most recent 4.0 version, a new monitoring tool is available;) + > db.enableFreeMonitoring() + { + "state" : "enabled", + "message" : "To see your monitoring data, navigate to the unique URL below. Anyone you share the URL with will also be able to view this page. You can disable monitoring at any time by running db.disableFreeMonitoring().", + "url" : "https://cloud.mongodb.com/freemonitoring/cluster/KAI3EQPMSZHNGDELYLDNA6QVCPZ5IK6B", + "userReminder" : "", + "ok" : 1 + } + + # Create an admin user for the server + > use admin + > db.createUser( + { + user: "alignak", + pwd: "alignak", + roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] + } + ) + + Successfully added user: { + "user" : "alignak", + "roles" : [ + { + "role" : "userAdminAnyDatabase", + "db" : "admin" + } + ] + } + + # Exit and restart the server + Ctrl+C + + # Configure mongo in authorization mode + sudo vi /etc/mongod.conf + security: + authorization: enabled + + # Restart mongo + sudo systemctl restart mongod.service + # As of now, you will need to authenticate for any operation on the MongoDB databases + + mongo -u alignak -p alignak + > show dbs + admin 0.000GB + config 0.000GB + local 0.000GB + + + > use alignak + > db.createUser( + { + user: "alignak", + pwd: "alignak", + roles: [ "readWrite", "dbAdmin" ] + } + ) + + Successfully added user: { "user" : "alignak", "roles" : [ "readWrite", "dbAdmin" ] } + + > db.test.save( { test: "test" } ) + # This will create atest collection in the database, which will create the DB in mongo server + + > show dbs + admin 0.000GB + alignak 0.001GB + config 0.000GB + local 0.000GB + + +Configure, run and feed Alignak backend +======================================= + +It is not necessary to change anything in the Alignak backend configuration file except if your MongoDB installation is not a local database configured by default. Else, open the */usr/local/share/alignak-backend/etc/settings.json* configuration file to set-up the parameters according to your configuration. + +Start / stop the backend +------------------------ + +Run the Alignak backend according to the documentation. We are assuming a system service installation:: + + sudo service alignak-backend start + + # Check running processes + ps -aux | grep uwsgi + alignak 10291 0.0 0.5 322784 83484 - SJ 16:21 0:01.65 /usr/local/bin/uwsgi --master --enable-threads --daemonize /dev/null --wsgi-file /usr/local/share/alignak-bac + alignak 10345 0.0 0.5 300740 81268 - IJ 16:21 0:00.00 /usr/local/bin/uwsgi --master --enable-threads --daemonize /dev/null --wsgi-file /usr/local/share/alignak-bac + alignak 10346 0.0 0.5 300740 81264 - IJ 16:21 0:00.00 /usr/local/bin/uwsgi --master --enable-threads --daemonize /dev/null --wsgi-file /usr/local/share/alignak-bac + alignak 10347 0.0 0.5 300740 81268 - IJ 16:21 0:00.00 /usr/local/bin/uwsgi --master --enable-threads --daemonize /dev/null --wsgi-file /usr/local/share/alignak-bac + alignak 10348 0.0 0.5 300740 81268 - IJ 16:21 0:00.00 /usr/local/bin/uwsgi --master --enable-threads --daemonize /dev/null --wsgi-file /usr/local/share/alignak-bac + alignak 10349 0.0 0.5 304836 84904 - IJ 16:21 0:00.00 /usr/local/bin/uwsgi --master --enable-threads --daemonize /dev/null --wsgi-file /usr/local/share/alignak-bac + + sudo service alignak-backend stop + + +Feed the backend +---------------- + +Alignak ships a flat-file configuration importation script to help feedinf Nagios legacy flat-files configuration into the Alignak backend. This script is used to parse, check and import a Nagios-like configuration into the Alignak backend. + +**Note** that it is not mandatory to install and use this script because the Alignak WebUI allows to create all the monitored objects configuration from scratch :) + +For this demo, we will install and use the `alignak-backend-import` script. So let's install it:: + + # Alignak backend importation script + sudo pip install alignak-backend-import + + + +Run the Alignak backend import script to push the demo configuration into the backend::: + + # Import the demo configuration into the backend + cd ~/repos/alignak + alignak-backend-import -d ./etc/alignak.cfg + ... + ... + ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + alignak-backend-import, inserted elements: + - 10 command(s) + - 37 host(s) + - 8 host_template(s) + - no hostdependency(s) + - no hostescalation(s) + - 2 hostgroup(s) + - 1 realm(s) + - 40 service(s) + - 37 service_template(s) + - no servicedependency(s) + - no serviceescalation(s) + - 1 servicegroup(s) + - 4 timeperiod(s) + - 3 user(s) + - 1 user_template(s) + - 2 usergroup(s) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Global configuration import duration: 8.65677189827 + +**Note**: *there are other solutions to feed the Alignak backend but we choose to show how to get an existing configuration imported in the Alignak backend to migrate from an existing Nagios/Shinken to Alignak.* + +Once imported, you can check that the configuration is correctly parsed by Alignak:: + + # Check Alignak demo configuration (from the git repo) + alignak-arbiter -V -a ~/repos/alignak-demo/alignak_demo/etc/alignak.cfg + + [2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Creating packs for realms + [2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Number of hosts in the realm North: 2 (distributed in 2 linked packs) + [2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Number of hosts in the realm South: 3 (distributed in 2 linked packs) + [2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Number of hosts in the realm All: 7 (distributed in 7 linked packs) + [2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Number of Contacts : 5 + [2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Number of Hosts : 12 + [2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Number of Services : 305 + [2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Number of Commands : 78 + [2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Total number of hosts in all realms: 12 + [2017-01-06 11:57:28 CET] INFO: [alignak.daemons.arbiterdaemon] Things look okay - No serious problems were detected during the pre-flight check + [2017-01-06 11:57:28 CET] INFO: [alignak.daemons.arbiterdaemon] Arbiter checked the configuration + +**Note** *because the backend is now started and available, there is no more ERROR raised during the configuration check! You may still have some information about duplicate elements but nothing to take care of...* + +As of now, Alignak is ready to start... let us go! + + diff --git a/alignak_demo/docs/graphite.rst b/alignak_demo/docs/graphite.rst new file mode 100644 index 0000000..7f4a21b --- /dev/null +++ b/alignak_demo/docs/graphite.rst @@ -0,0 +1,340 @@ +Installing Graphite/Grafana +########################### + +*Alignak is timeseries friendly...* + +This repository contains many stuff for Alignak: + +- demo configuration to set-up a demo server (the one used for http://demo.alignak.net) + +- some various tests configurations (each having a README to explain what they are made for) + +- scripts to run the Alignak daemons for the demo server (may be used for other configurations) + + +All the procedures in this document are existing in the Alignak documentation which is available on `Read The Docs `_. The aim of this document is simply to contain a simple and easy procedure to set-up a standard configuration demonstrating what Alignak is capable of. + + +9. Configure Alignak backend for timeseries +------------------------------------------- + +The Alignak backend allows to send collected performance data to a timeseries database. It must be configured to know where to send the timeseries data. + +**Note**: Using StatsD as a front-end to the Graphite Carbon collector is not mandatory but it will help to have more regular statistics and it will maintain a metrics cache. But the purpose of this doc is not to discuss about the benefits / drawbacks of StatsD... + +Using the Alignak WebUI makes it really easy to configure. Navigate to the Web UI Alignak backend menu and select the *Backend Grafana* item. Enter edition mode and add a new item. Also create a new Graphite item related to the Grafana item you just created, and that's it ... + +You can also use command line scripts to create such information in the Alignak backend. Using the `alignak-backend-client` script makes it easy to configure this: +:: + + cd ~/demo + + # Get the example configuration files + cp /usr/local/etc/alignak/sample/backend/* ~/demo + + +If you **do not** intend to use the StatsD daemon, execute these commands: +:: + + # Use Alignak backend CLI to add a Grafana instance + alignak-backend-cli -v add -t grafana --data=example_grafana.json grafana_demo + + # Use Alignak backend to add a Graphite instance + alignak-backend-cli -v add -t graphite --data=example_graphite.json graphite_demo + + +If you **do** intend to use the StatsD daemon, execute these commands: +:: + + # Use Alignak backend CLI to add a Grafana instance + alignak-backend-cli -v add -t grafana --data=example_grafana.json grafana_demo + + # Use Alignak backend CLI to add a StatsD instance + alignak-backend-cli -v add -t statsd --data=example_statsd.json statsd_demo + + # Use Alignak backend to add a Graphite instance + alignak-backend-cli -v add -t graphite --data=example_graphite_statsd.json graphite_demo + +You can edit the *example_*.json* provided files to include your own Graphite / Grafana (or InfluxDB) parameters. For more information see the `Alignak backend documentation `_. + +**Warning**: It will be mandatory to update the Grafana configuration with your own Grafana API key else the backend will not be able to create the Grafana dashboards and panels automatically! + +**Note**: `alignak-backend-cli` is coming with the installation of the Alignak backend client. + +10. Upgrading +------------- +Some updates are regularly pushed on the different alignak repositories and then you will sometime need to update this demo configuration. Before upgrading the application you should stop Alignak: +:: + + cd ~/demo + # Stop all alignak processes + ./alignak_demo_stop.sh + + # Check everything is stopped + ps -ef | grep alignak- + + # Kill remaining processes. It may happen on a demo server;) + pkill alignak-broker + + +To upgrade Alignak, you can: +:: + + cd ~/repos/alignak + + # Get the last develop version + git pull + + # Install alignak and all its python dependencies + # -v will activate the verbose mode of pip + sudo pip install -v . + + # Create alignak user/group and set correct permissions on installed configuration files + sudo ./dev/set_permissions.sh + + +To upgrade all the alignak packages that were installed, you can: +:: + + pip install -U pip list | grep alignak | awk '{ print $1}' + + +To list the currently installed packages and to know if they are up-to-date, you can use this command: +:: + + pip list --outdated | grep alignak + + +To get the list of outdated packages as a pip requirements list: +:: + + pip list --outdated --format columns | grep alignak | awk '{printf "%s==%s\n", $1, $3}' > alignak-update.txt + +and to update: +:: + + pip install -r alignak-update.txt + + + +What we see? +============ + +Monitored system status +----------------------- + +The `Alignak Web UI `_ running on our demo server allows to view the monitored system status. Have a look here: `http://demo.alignak.net `_. Several login may be used depending on the user role: + +* admin / admin, to get logged-in as an Administrator. You will see all the hosts and will be able to execute some commands (acknowledge a problem, schedule a downtime,...) + +* northman / north, to get logged-in as a power user in the North realm. You will see all the hosts of the All and North realms and will be able to execute commands. + +* southman / south, to get logged-in as a power user in the South realm. You will see all the hosts of the All and South realms and will be able to execute commands. + + +Alignak internal metrics +------------------------ + +Alignak maintains its own internal metrics and it is able to send them to a `StatsD server `_. Install the StatsD server locally (as explained later in this document) and update the `alignak.cfg` configuration file to enable this feature: +:: + + # Export all alignak inner performances into a statsd server. + # By default at localhost:8125 (UDP) with the alignak prefix + # Default is not enabled + statsd_host=localhost + #statsd_port=8125 + statsd_prefix=alignak + statsd_enabled=1 + + +We are running a `demo Grafana server `_ that allows to see the Alignak internal metrics. Several dashboards are available: + +* `Alignak internal metrics `_ shows the statistics provided by Alignak. This sample dashboard is available in the Alignak repository, *contrib* folder. + +* `Graphite server `_ reports on Carbon/Graphite own monitoring. This dashboard is available from the Grafana.net web site. + + + +Installing StatsD / Graphite / Grafana +-------------------------------------- + +**NOTE** this section is a draft chapter. Currently the installatin described here is not fully functional ! + +StatsD +~~~~~~ +Install node.js on your server according to the recommended installation process. + +On FreeBSD: +:: + + pkg install node + +On Ubuntu / Debian: +:: + + # For Node.js 6 + curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - + sudo apt-get install -y nodejs + +To get the most recent StatsD (if you distro packaging do not provide it, you must clone the git repository: +:: + + $ cd ~ + $ git clone https://github.com/etsy/statsd + $ cd statsd + + # Create an alignak.js file with the following content (for a localhost Graphite) + $ cp exampleConfig.js alignak.js + $ cat alignak.js +{ + graphitePort: 2003 + , graphiteHost: "127.0.0.1" + , port: 8125 + , backends: [ "./backends/graphite" ] + + /* Do not use any StatsD metric hierarchy */ + , graphite: { + /* Do not use legacy namespace */ + legacyNamespace: false + + /* Set a global prefix */ + , globalPrefix: "alignak-statsd" + + /* Set empty prefixes */ + , prefixCounter: "" + , prefixTimer: "" + , prefixGauge: "" + , prefixSet: "" + + /* Do not set any global suffix + , globalSuffix: "_" + */ + } +} + + + # Start the StatsD daemon in a screen + $ screen -S statsd + $ node stats.js alignak.js + # And leave the screen... + $ Ctrl+AD + + # Test StatsD + $ ll /var/lib/graphite/whisper/alignak-statsd/statsd/ + total 84 + drwxr-xr-x 6 _graphite _graphite 4096 févr. 2 20:11 ./ + drwxr-xr-x 3 _graphite _graphite 4096 févr. 2 20:11 ../ + drwxr-xr-x 2 _graphite _graphite 4096 févr. 2 20:11 bad_lines_seen/ + drwxr-xr-x 2 _graphite _graphite 4096 févr. 2 20:11 graphiteStats/ + drwxr-xr-x 2 _graphite _graphite 4096 févr. 2 20:11 metrics_received/ + -rw-r--r-- 1 _graphite _graphite 17308 févr. 2 20:12 numStats.wsp + drwxr-xr-x 2 _graphite _graphite 4096 févr. 2 20:11 packets_received/ + -rw-r--r-- 1 _graphite _graphite 17308 févr. 2 20:12 processing_time.wsp + -rw-r--r-- 1 _graphite _graphite 17308 févr. 2 20:12 timestamp_lag.wsp + + +As of now you have a running StatsD daemon that will collect the Alignak internal metrics to feed Graphite. + +Graphite Carbon +~~~~~~~~~~~~~~~ +:: + + $ sudo su + + $ apt-get update + + # Set TZ as UTC + $ dpkg-reconfigure tzdata + => UTC + + # Install Carbon + $ apt-get install graphite-carbon + + # Configure Carbon + $ vi /etc/default/graphite-carbon + # Enable carbon service on boot + => CARBON_CACHE_ENABLED=true + + # Configuration file + $ vi /etc/carbon/carbon.conf + # Enable log rotation + => ENABLE_LOGROTATION = True + + # Aggregation configuration (default is suitable...) + $ cp /usr/share/doc/graphite-carbon/examples/storage-aggregation.conf.example /etc/carbon/storage-aggregation.conf + + # Start the metrics collector service (Carbon) + $ service carbon-cache start + + # Monitor activity + $ tail -f /var/log/carbon/console.log + + # Test carbon (send a metric test.count) + $ echo "test.count 4 `date +%s`" | nc -q0 127.0.0.1 2003 + $ ls /var/lib/graphite/whisper + => test/count.wsp + +Graphite API +~~~~~~~~~~~~ +No need for the Graphite Web application, we will use Grafana ;) + +:: + + $ sudo su + + # Install Graphite-API + ##### $ apt-get install graphite-api; do not seem to survive a system restart :) + $ wget https://github.com/brutasse/graphite-api/releases/download/1.1.2/graphite-api_1.1.2-1447943657-ubuntu14.04_amd64.deb + $ dpkg -i + + # Install Nginx / uWsgi + $ apt-get install nginx uwsgi uwsgi-plugin-python + + # Configure uWsgi + $ vi /etc/uwsgi/apps-available/graphite-api.ini + [uwsgi] + processes = 2 + socket = localhost:8080 + plugins = python27 + module = graphite_api.app:app + buffer = 65536 + + $ ln -s /etc/uwsgi/apps-available/graphite-api.ini /etc/uwsgi/apps-enabled + $ service uwsgi restart + + # Configure nginx + $ vi /etc/nginx/sites-available/graphite.conf + server { + listen 80; + + location / { + include uwsgi_params; + uwsgi_pass localhost:8080; + } + } + + $ ln -s /etc/nginx/sites-available/graphite.conf /etc/nginx/sites-enabled + $ service nginx restart + +StatsD +~~~~~~ +:: + + To be completed ! + + +Grafana +~~~~~~~ +:: + + # Install Grafana (Version 4 only supported by the Alignak backend!) + wget https://grafanarel.s3.amazonaws.com/builds/grafana_3.1.1-1470047149_amd64.deb + apt-get install -y adduser libfontconfig + dpkg -i grafana_3.1.1-1470047149_amd64.deb + + # Configure Grafana (not necessary...) + $ vi /etc/grafana/grafana.ini + + $ service grafana-server start + + # Open your web browser on http://127.0.0.1:3000 \ No newline at end of file diff --git a/alignak_demo/etc/alignak-backend-import.cfg b/alignak_demo/etc/alignak-backend-import.cfg deleted file mode 100755 index a47981f..0000000 --- a/alignak_demo/etc/alignak-backend-import.cfg +++ /dev/null @@ -1,63 +0,0 @@ -# -------------------------------------------------------------------- -# Alignak main configuration file -# -------------------------------------------------------------------- -# This file is the main file that will be loaded by Alignak on boot. -# It is the entry point for the framework configuration. -# -------------------------------------------------------------------- -# Please see the official project documentation for documentation about -# the configuration: -# http://alignak-doc.readthedocs.io/en/latest/04_configuration/index.html -# -------------------------------------------------------------------- - -# ------------------------------------------------------------------------- -# Monitored objects configuration part -# ------------------------------------------------------------------------- -# Configuration files with common objects like commands, timeperiods, -# or templates that are used by the host/service/contacts -; When loading data only from the alignak backend, comment this -; block because data do not need to be read from files -cfg_dir=arbiter/objects/realms -cfg_dir=arbiter/objects/commands -cfg_dir=arbiter/objects/timeperiods -cfg_dir=arbiter/objects/escalations -cfg_dir=arbiter/objects/dependencies - -# Templates and packs for hosts, services and contacts -; When loading data only from the alignak backend, comment this -; block because data do not need to be read from files -cfg_dir=arbiter/templates -cfg_dir=arbiter/packs - -# Notification ways -; When loading data only from the alignak backend, comment this -; block because data do not need to be read from files -cfg_dir=arbiter/objects/notificationways - -# Groups -; When loading data only from the alignak backend, comment this -; block because data do not need to be read from files -cfg_dir=arbiter/objects/servicegroups -cfg_dir=arbiter/objects/hostgroups -cfg_dir=arbiter/objects/contactgroups - -# Real hosts, services and contacts -; When loading data only from the alignak backend, comment this -; block because data do not need to be read from files -cfg_dir=arbiter/objects/hosts -cfg_dir=arbiter/objects/services -cfg_dir=arbiter/objects/contacts - -# Alignak daemons and modules are loaded -cfg_dir=arbiter/daemons -cfg_dir=arbiter/modules - -# ------------------------------------------------------------------------- -# Alignak demo extra configuration -# ------------------------------------------------------------------------- -cfg_dir=arbiter/realms - -# ------------------------------------------------------------------------- -# Alignak framework configuration part -# ------------------------------------------------------------------------- - -cfg_file=alignak.cfg diff --git a/alignak_demo/etc/alignak-logger.json b/alignak_demo/etc/alignak-logger.json new file mode 100644 index 0000000..2845e93 --- /dev/null +++ b/alignak_demo/etc/alignak-logger.json @@ -0,0 +1,70 @@ +{ + "version": 1, + "disable_existing_loggers": false, + "formatters": { + "alignak": { + "format": "[%(asctime)s] %(levelname)s: [%(daemon)s.%(name)s] %(message)s", + "datefmt": "%Y-%m-%d %H:%M:%S" + }, + "monitoring-log": { + "format": "[%(asctime)s] %(levelname)s: %(message)s", + "datefmt": "%Y-%m-%d %H:%M:%S" + } + }, + + "handlers": { + "unit_tests": { + "class": "alignak.log.CollectorHandler", + "level": "DEBUG", + "formatter": "alignak" + }, + "console": { + "class": "logging.StreamHandler", + "level": "DEBUG", + "formatter": "alignak", + "stream": "ext://sys.stdout" + }, + "color_console": { + "class": "alignak.log.ColorStreamHandler", + "level": "DEBUG", + "formatter": "alignak", + "stream": "ext://sys.stdout" + }, + "daemons": { + "class": "logging.handlers.TimedRotatingFileHandler", + "level": "DEBUG", + "formatter": "alignak", + "filename": "%(logdir)s/%(daemon)s.log", + "when": "midnight", + "interval": 1, + "backupCount": 7 + }, + "monitoring_logs": { + "class": "logging.handlers.TimedRotatingFileHandler", + "level": "INFO", + "formatter": "monitoring-log", + "filename": "%(logdir)s/monitoring-log/monitoring-logs-%(daemon)s.log", + "when": "midnight", + "interval": 1, + "backupCount": 365 + } + }, + + "loggers": { + "alignak": { + "level": "INFO", + "handlers": ["color_console", "daemons"], + "propagate": "no" + }, + "monitoring-log": { + "level": "DEBUG", + "handlers": ["console", "monitoring_logs"], + "propagate": "no" + } + }, + + "root": { + "level": "ERROR", + "handlers": [] + } +} \ No newline at end of file diff --git a/alignak_demo/etc/alignak-new.cfg b/alignak_demo/etc/alignak-new.cfg new file mode 100755 index 0000000..164077b --- /dev/null +++ b/alignak_demo/etc/alignak-new.cfg @@ -0,0 +1,31 @@ +# -------------------------------------------------------------------- +# Alignak main configuration file +# -------------------------------------------------------------------- +# This file is the main file that will be loaded by Alignak on boot. +# It is the entry point for the framework configuration. +# -------------------------------------------------------------------- +# Please see the official project documentation for documentation about +# the configuration: +# http://alignak-doc.readthedocs.io/en/latest/04_configuration/index.html +# -------------------------------------------------------------------- + +# ------------------------------------------------------------------------- +# Begin - Monitored objects configuration part +# ------------------------------------------------------------------------- + +# This part of the configuration is removed because the monitored +# objects are fetched from the Alignak backend. + +# ------------------------------------------------------------------------- +# End - Monitored objects configuration part +# ------------------------------------------------------------------------- + +# ------------------------------------------------------------------------- +# Begin - Alignak macros configuration +# ------------------------------------------------------------------------- +# You will find global MACROS into the files in those directories +cfg_dir=arbiter/resource.d +cfg_dir=arbiter/packs/resource.d +# ------------------------------------------------------------------------- +# End - Alignak macros configuration +# ------------------------------------------------------------------------- diff --git a/alignak_demo/etc/alignak.cfg b/alignak_demo/etc/alignak.cfg index 6246843..048de71 100755 --- a/alignak_demo/etc/alignak.cfg +++ b/alignak_demo/etc/alignak.cfg @@ -57,8 +57,10 @@ cfg_dir=arbiter/objects/contacts # Begin - Alignak framework configuration part # ------------------------------------------------------------------------- # Alignak daemons and modules to be loaded -cfg_dir=arbiter/daemons -cfg_dir=arbiter/modules +# New: daemon configuration is now located in the alignak.ini file +##### cfg_dir=arbiter/daemons +# New: daemon modules is now located in the alignak.ini file +##### cfg_dir=arbiter/modules # You will find global MACROS into the files in those directories cfg_dir=arbiter/resource.d @@ -80,7 +82,7 @@ cfg_dir=arbiter/packs/resource.d # Notifications are enabled/disabled # enable_notifications=1 -# After a timeout, launched plugins are killed +# After a short_timeout, launched plugins are killed #notification_timeout=30 @@ -100,7 +102,7 @@ cfg_dir=arbiter/packs/resource.d #max_plugins_output_length=8192 max_plugins_output_length=65536 -# After a timeout, launched plugins are killed +# After a short_timeout, launched plugins are killed # and the host state is set to a default value (2 for DOWN) # and the service state is set to a default value (2 for CRITICAL) #host_check_timeout=30 @@ -187,7 +189,7 @@ no_event_handlers_during_downtimes=1 #global_host_event_handler= #global_service_event_handler= -# After a timeout, launched plugins are killed +# After a short_timeout, launched plugins are killed #event_handler_timeout=30 @@ -258,7 +260,7 @@ enable_environment_macros=0 # [Optional], a pack distribution file is a local file near the arbiter # that will keep host pack id association, and so push same host on the same # scheduler if possible between restarts. -pack_distribution_file=/usr/local/var/lib/alignak/pack_distribution.dat +pack_distribution_file=./pack_distribution.dat # If you need to set a specific timezone to your deamons, uncomment it diff --git a/alignak_demo/etc/alignak.ini b/alignak_demo/etc/alignak.ini index 0af668e..8fc9437 100644 --- a/alignak_demo/etc/alignak.ini +++ b/alignak_demo/etc/alignak.ini @@ -1,114 +1,602 @@ -# -# Copyright (C) 2015-2016: Alignak team, see AUTHORS.txt file for contributors -# -# This file is part of Alignak. -# -# Alignak is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Alignak is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Alignak. If not, see . -# - -# -# This configuration file is the main Alignak configuration entry point. Each Alignak installer -# will adapt the content of this file according to the installation process. This will allow -# any Alignak extension or third party application to find where the Alignak components and -# files are located on the system. -# -# --- -# This version of the file contains variable that are suitable to run a single node Alignak -# with all its daemon using the default configuration existing in the repository. -# - -# Main alignak variables: -# - BIN is where the launch scripts are located -# (Debian sets to /usr/bin) -# - ETC is where we store the configuration files -# (Debian sets to /etc/alignak) -# - VAR is where the libraries and plugins files are installed -# (Debian sets to /var/lib/alignak) -# - RUN is the daemons working directory and where pid files are stored -# (Debian sets to /var/run/alignak) -# - LOG is where we put log files -# (Debian sets to /var/log/alignak) -# +; +; This configuration file is the main Alignak configuration entry point. Each Alignak installer +; will adapt the content of this file according to the installation process. This will allow +; any Alignak extension or third party application to find where the Alignak components and +; files are located on the system. +; +; --- +; This version of the file contains variable that are suitable to run a single node Alignak +; with all its daemon using the default configuration existing in the repository. +; + + +; Declaring script macros +; ----- +; To declare a macro that can be used in the plugins scripts, you must set a variable prefixed +; with an underscore (_). All the variables prefixed with _ will be transformed to macros +; the leading and trailng underscores will be removed and the variable name will be uppercased. +; +; A variable _test_macro will become a $TEST_MACRO$ +; A variable _test_macro_ will become a $TEST_MACRO$ +; + +; Main alignak variables. +; ----- +; The variables declared in this DEFAULT section will be inherited in all +; the other sections of this file! +; +; Two main interests for this section: +; - define the global Alignak configuration parameters +; - define the common parameters to all the Alignak configuration daemons +; [DEFAULT] -BIN=/usr/local/bin -ETC=/usr/local/etc/alignak -VAR=/usr/local/var/libexec/alignak -RUN=/usr/local/var/run/alignak -LOG=/usr/local/var/log/alignak -USER=alignak -GROUP=alignak - -# We define the name of the 2 main Alignak configuration files. -# There may be 2 configuration files because tools like Centreon generate those... +; -------------------------------------------------------------------- +; Installation directories +; ---------- +; - _dist_BIN is where the launch scripts are located +; (Standard installation sets to /usr/local/bin) +; - _dist_ETC is where we store the configuration files +; (Standard installation sets to /usr/local/etc/alignak) +; - _dist_VAR is where the libraries and plugins files are installed +; (Standard installation sets to /usr/local/var/lib/alignak) +; - _dist_RUN is the daemons working directory and where pid files are stored +; (Standard installation sets to /usr/local/var/run/alignak) +; - _dist_LOG is where we put log files +; (Standard installation sets to /usr/local/var/log/alignak) +_dist=/usr/local/ +_dist_BIN=%(_dist)s/bin +_dist_ETC=%(_dist)s/etc/alignak +_dist_VAR=%(_dist)s/var/lib/alignak +_dist_RUN=%(_dist)s/var/run/alignak +_dist_LOG=%(_dist)s/var/log/alignak + +; Daemons path configuration +; ---------- +; Set as the default installation paths. +; If you set relative paths, they are relative to the default working directory. +workdir=%(_dist_RUN)s +logdir=%(_dist_LOG)s +etcdir=%(_dist_ETC)s +bindir=%(_dist_BIN)s +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Generic configuration name +; ---------- +; This is the name used for this configuration +; The only purpose of this variable is to make it easier to search in the system log +config_name=Alignak global configuration + +; Alignak instance name +; ---------- +; This information is useful to get/store alignak global configuration in the Alignak backend +; If you share the same backend between several Alignak instances, each instance must have its own +; name. If not defined, Alignak will use the master arbiter name as Alignak instance name. +; Anyway, it is recommended to make it unique if you run several Alignak instances +alignak_name=My Alignak +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Alignak monitoring +; ---------- +; The arbiter daemon can report the overall Alignak status to an external application that +; exposes the same services as implemented by the Alignak Web service module. +; The Arbiter will report the Alignak status as a passive host check. The Alignak daemons +; are considered as some services of an host named with the alignak_name + +; Default is no reporting - else set the monitor URL +;alignak_monitor = http://127.0.0.1:7773/ws +; Set the username and password to use for the authentication +; If not set, no authentication will be used +;alignak_monitor_username = admin +;alignak_monitor_password = admin +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Alignak log management +; ---------- +; Python logger configuration file +; Default is to get this file in the same directory as the alignak.ini +logger_configuration=./alignak-logger.json +; This will set the daemon log file +; -------------------------------------------------------------------- + +; -------------------------------------------------------------------- +; Timezone +; ---------- +; If you need to set a specific timezone to your deamons, update and uncomment this +; Useful if you have multiple instances of Alignak that need to run from the same server, +; but have different local times associated with them. If not specified, Alignak will use +; the system configured timezone. +;use_timezone=Europe/Paris +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Daemons configuration +; ---------- +; Unset for the daemon to be ignored by the arbiter +; Use this with many care and only if you really want a running daemon to be ignored! +; If you think you need to use this parameter, do not hesitate to contact us;) +;active=1 + +; Debugging daemons +; If this is set, the daemon log level is set to DEBUG +;debug=true + +; Username and group to run +; ---------- +; If not defined, the current user account will be used instead. +; It is recommended to define an alignak:alignak user/group account on your system. +; When Alignak is started with system services, it will try to use the root account which +; is not a recommended configuration... +; Note that this configuration will be ignored if it exists ALIGNAK_USER/ALIGNAK_GROUP +; environment variables because they will take precedence over this file configuration +;user=alignak +;group=alignak + +; Disabling security means allowing the daemons to run under root account +; Set this variable to allow daemons running as root +;idontcareaboutsecurity=0 + +; Log file +; The daemon log file is configured according to the Python logger but it is +; still possible to override this... +;log_filename=%(workdir)s/daemon.log +; Same for the log_level +;log_level= + +; Include the CherryPy daemon HTTP server log in the daemon log file +; This is interesting if you want many many details about the daemons inter-communication +;log_cherrypy=1 + +; Pid file +; The daemon will chdir into the workdir directory when launched +; and it will create its pid file in this working dir +; You can override this location with the pid_filename variable +;pid_filename=%(workdir)s/daemon.pid + +; Realm +; Each daemon is concerned by a realm. It will receive an appropriate configuration +; according to its realm +; The default value is the realm 'All' +;realm=All + +; Advanced realm parameters: +; Do not change this paraemter unless you know what you are doing;) +; Is the daemon linked to the schedulers of sub-realms or only for its own realm? +; The default is that a daemon will also manage the sub realms of its realm. This parameter is +; useful if you need to define some daemons dedicated to a specific realm +; Make sure to avoid having several daemons of the same type for the same realm ;) +;manage_sub_realms=1 + +; Is the daemon connected to the arbiters? +; The default is that the daemon will not have a relation with the Alignak arbiter +; Handle this parameter with much care! +; An arbiter daemon will force-have a relation with the master arbiter +; A scheduler will also force-have a relation with the master arbiter +; This is only useful for a broker daemon. The master arbiter will push its brok to all +; the brokers that manage arbiters +;manage_arbiters=0 + +; Daemon high availability mode +; Unset (default) this parameter for a normal daemon +; Set for a spare daemon. A spare daemon will assume the main daemon role if the +; main daemon is not available +;spare=0 + +; Set to make the process daemonize itself, else it runs as a foreground process +;is_daemon=0 + +; Set to make the arbiter launch the daemon process +; If set, the arbiter will launch the corresponding daemon, else it will consider +; that this daemon is still started +;alignak_launched=1 + +; Set if you want to replace a running daemon. If an existing pid file is found +; the new process will try to kill an existing instance before daemonizing itself +;do_replace=0 + +; Daemons WS interface +; ---------- +; Network configuration +; ----- +; daemon host is set to 0.0.0.0 to listen on all interfaces, +; set 127.0.0.1 for a local loop only listening daemon +;host=0.0.0.0 +; Port the daemon is listening to +;port=10000 +; address is the IP address (or FQDN) used by the other daemons to contact the daemon +;address=127.0.0.1 +; Number of threads the daemon is able to listen to +; Increase this number if some connection problems are raised; the more daemons exist in +; the configuration the more this pool size must be important +;thread_pool_size=32 + +; Daemon availability +; ----- +; Daemon interface uses two different timeouts: +; - short for light data and long for heavy data exchanges +;short_timeout=3 +;long_timeout=120 + +; If daemon communication fails max_check_attempts tims, the daemon is considered as dead +;max_check_attempts=3 + +; SSL configuration +; ----- +; Configure this part if you are using SSL for communication between the Alignak daemons +;use_ssl=0 +; Paths for certificate files +;server_cert=%(etcdir)s/certs/server.crt +;server_key=%(etcdir)s/certs/server.key +;ca_cert=%(etcdir)s/certs/ca.pem + +;### Deprecated option - feel free to request for an implementation if needed +;hard_ssl_name_check=0 +;### Deprecated option - feel free to request for an implementation if needed +;server_dh=%(etcdir)s/certs/server.pem + +; Daemons external modules watchdog -- +; ---------- +; If a daemon external module has a brok queue higher than this value, it will be +; killed and restarted. +; Set to 0 to disable this behavior +;max_queue_size=0 +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Notifications configuration +; --- +; Notifications are enabled/disabled +;enable_notifications=1 + +# After a short_timeout, launched notification scripts are killed +;notification_timeout=30 +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Retention configuration +; --- +; Number of minutes between 2 retention save, default is 60 minutes +; This is only used if retention is enabled +; todo: move this parameter to the retention aware modules? +; If 0, the retention is disabled, else retention is enabled and the retention period is +; defined in the scheduler ticks parameters (see later) +;retention_update_interval=60 +; Old Nagios unused parameter. +;state_retention_file= +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Active checks configuration +; --- +; Active host/service checks are enabled/disabled +;execute_host_checks=1 +;execute_service_checks=1 + +; Max plugin output in bytes for the plugins launched by the pollers +; Change this only if needed to increase for very long output check plugins +;max_plugins_output_length=8192 + +; Disabling environment macros for the check plugins is better for performance. +; If you really need to use environment variables, set this parameter. +;enable_environment_macros=0 + +; After a short_timeout, launched plugins are killed +; and the host state is set to a default value (2 for DOWN) +; and the service state is set to a default value (2 for CRITICAL) +;host_check_timeout=30 +;service_check_timeout=60 +;timeout_exit_status=2 +# -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Passive checks configuration +; --- +; Passive host/service checks are enabled/disabled +;accept_passive_host_checks=1 +;accept_passive_service_checks=1 + +; Does Alignak accept passive check results for unknown hosts? +;accept_passive_unknown_check_results=1 + +; As default, Alignak always consider that passive host checks are SOFT states and it manages +; the check attempts before raising a HARD state. This Nagios parameter is not managed: +;passive_host_checks_are_soft=0 + +; Freshness check +; --- +; Default is enabled for hosts and services +; This all host/services that are passive checks enabled and not active checks +; enabled will have their freshness checked +;check_host_freshness=1 +;check_service_freshness=1 +; How often Alignak is checking for host/service freshness +; Default is 60 for hosts and services +;host_freshness_check_interval=60 +;service_freshness_check_interval=60 +; Extra time for freshness check ... +;additional_freshness_latency=15 +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Checks scheduler configuration +; --- +; Scheduler interval length configuration +; Do not change this value unless you are really sure to master what you are doing... +;interval_length=60 + +; Number of intervals to spread the very first checks for hosts and services +; 5 minutes looks correct indeed... +;max_service_check_spread=5 +;max_host_check_spread=5 +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Flapping detection configuration +; --- +; Default is enabled +;enable_flap_detection=1 +; +; Flapping threshold for hosts and services +;low_service_flap_threshold=20 +;high_service_flap_threshold=30 +;low_host_flap_threshold=20 +;high_host_flap_threshold=30 +; +; flap_history is the lengh of history states we keep to look for flapping. +; 20 is a correct default value but it can be increased. +;flap_history=20 +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Performance data configuration +; --- +; Performance data management is enabled/disabled +;process_performance_data=1 +; Commands to process the performance data +; Old Nagios parameters that are not used by Alignak +;host_perfdata_command= +;service_perfdata_command= +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Event handlers configuration +; --- +; Event handlers are enabled/disabled +;enable_event_handlers=1 +; +; By default don't launch event handlers during a downtime period. +; Unset to get back the default Nagios behavior and raise event handlers during the downtime periods +;no_event_handlers_during_downtimes=1 + +; Global host/service event handlers: short names of defined commands +;global_host_event_handler= +;global_service_event_handler= +; +; After a short_timeout, launched event handlers are killed +;event_handler_timeout=30 +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; External commands configuration +; --- +; External commands are enabled/disabled +; Unset to disable the Alignak external commands processing +;check_external_commands=1 +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Impacts configuration +; --- +; Enable or not the state change on impact detection (like a host going unreachable +; if a parent is DOWN for example). It's for services and hosts. +; Note: unset this for Nagios old behavior compatibility +;enable_problem_impacts_states_change=1 +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Monitoring log configuration +; --- +; Note that alerts and downtimes are always logged +; --- +; -------------------------------------------------------------------- +; Does a monitoring log raise a brok? +; Set to 1 if you intend to use a broker module that need to subscribe to the monitoring log broks +; Do not set this parameter except if needed +;monitoring_log_broks=0 + +; Notifications +;log_notifications=1 + +; Services retries +;log_service_retries=1 + +; Hosts retries +;log_host_retries=1 + +; Event handlers +;log_event_handlers=1 + +; Flappings +;log_flappings=1 + +; Snapshots +;log_snapshots=1 + +; External commands +;log_external_commands=1 + +; Active checks +; Default it not logging this event, because it makes a quite verbose log +;log_active_checks=0 + +; Passive checks +; Default it not logging this event, because it makes a quite verbose log +;log_passive_checks=0 + +; Initial states +; Default it not logging this event, because it makes a quite verbose log +;log_initial_states=0 +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Arbiter daemons part, +; --- +; The Arbiter is able to launch the required daemons that are not declared in the configuration +; To activate this feature, set this parameter +;launch_missing_daemons=0 + +; When the arbiter starts some daemons by itself +; This may happen if some hosts are defined in a realm that do not have all +; its required daemons defined or if the alignak_launched parameter is set +; for a daemon +; Daemons startup script location +; Default is to use the bin directory of the daemon +;daemons_script_location=%(bindir)s +; Daemons extra arguments +; Define some extra arguments to be provided on the daemon command line +;daemons_arguments= +; Default is to allocate a port number incrementally starting from the value defined here +;daemons_initial_port=10000 +; + +; Daemons monitoring +; --- +; The daemons are polling their satellites every polling_interval seconds +;polling_interval=5 +; After max_check_attempts unsuccessfull connection try, the daemon is declared as dead +;max_check_attempts=5 + +; The arbiter is checking the running processes for the daemons every daemons_check_period +; seconds. The checking only concerns the daemons that were started by the arbiter itself +;daemons_check_period=5 +; Daemons failure kill all daemons +; If a missing daemon is detected, all the arbiter children daemons will be killed and +; the arbiter will stop. This will make Alignak stop itself and restart if is configured to +; respawn in the system. +;daemons_failure_kill=1 +; +; Graceful stop delay +; - on stop request, the arbiter will inform the daemons that stopping will happen soon +; - after the daemons_stop_timeout period, the arbiter will force kill the daemons +; that it launched and inform the other daemons that stopping is now effective +;daemons_stop_timeout=15 +; +; Delay after daemons got started by the Arbiter +; The arbiter will pause a maximum delay of daemons_start_timeout or 0.5 seconds per +; launched daemon +; Whatever the value set in this file or internally computed, the arbiter will pause +;for a minimum of 1 second +;daemons_start_timeout=1 +; +; Delay before dispatching a new configuration after reload +; Whatever the value set in this file, the arbiter will pause for a minimum of 1 second +;daemons_new_conf_timeout=1 +; +; Delay after the configuration got dispatched to the daemons +; The arbiter will pause a maximum delay of daemons_dispatch_timeout or 0.5 seconds +; per launched daemon +; Whatever the value set in this file or internally computed, the arbiter will pause +; for a minimum of 1 second +;daemons_dispatch_timeout=5 +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Alignak internal metrics +; Export all alignak inner performance metrics to a statsd server. +; By default at localhost:8125 (UDP) with the alignak prefix +; -------------------------------------------------------------------- +;statsd_host = localhost +;statsd_port = 8125 +;statsd_prefix = alignak +; -------------------------------------------------------------------- +; When graphite_enabled is set, the Alignak internal metrics are sent +; to a graphite/carbon port instead of a StatsD instance. +; Contrary to StatsD, Graphite/carbon uses a TCP connection but it +; allows to bulk send metrics. +; This is more reliable and improved than the StatsD interface that is based upon UDP +; Default is not enabled for any interface +;statsd_enabled = 0 +;graphite_enabled = 0 +; -------------------------------------------------------------------- + + +; -------------------------------------------------------------------- +; Scheduler loop configuration +; Those parameters allow to configure the scheduler actions execution +; period. +; Each parameter is a scheduler recurrent action. On each scheduling +; loop turn, the scheduler checks if the time is come to execute +; the corresponding work. +; Each parameter defines on which loop turn count the action is to be +; executed. Considering a loop turn is 1 second, a parameter value set +; to 10 will make the corresponding action to be executed every 10 +; seconds. +; -------------------------------------------------------------------- +; BEWARE: changing some of those parameters may have unexpected +; effects! Do not change unless you know what you are doing ;) +; Some tips: +; - tick_check_freshness, allow to change the freshness check period +; - tick_update_retention, allow to change the retention save period +; -------------------------------------------------------------------- +;tick_update_downtimes_and_comments=1 +;tick_schedule=1 +; ### Check host/service freshness every 10 seconds +;tick_check_freshness=10 +;tick_consume_results=1 +;tick_get_new_actions=1 +;tick_scatter_master_notifications=1 +;tick_get_new_broks=1 +;tick_delete_zombie_checks=1 +;tick_delete_zombie_actions=1 +;tick_clean_caches=1 +; ### Retention save every hour +;tick_update_retention=3600 +;tick_check_orphaned=60 +; ### Notify about scheduler status every 10 seconds +;tick_update_program_status=10 +;tick_check_for_system_time_change=1 +; ### Internal checks are computed every loop turn +;tick_manage_internal_checks=1 +;tick_clean_queues=1 +; ### Note that if it set to 0, the scheduler will never try to clean its queues for oversizing +;tick_clean_queues=10 +;tick_update_business_values=60 +;tick_reset_topology_change_flags=1 +;tick_check_for_expire_acknowledge=1 +;tick_send_broks_to_modules=1 +;tick_get_objects_from_from_queues=1 +;tick_get_latency_average_percentile=10 + + + [alignak-configuration] -# Alignak main configuration file -CFG=%(ETC)s/alignak.cfg -# Alignak secondary configuration file (none as a default) -SPECIFICCFG= - - -# For each Alignak daemon, this file contains a section with the daemon name. The section -# identifier is the corresponding daemon name. This daemon name is built with the daemon -# type (eg. arbiter, poller,...) and the daemon name separated with a dash. -# This rule ensure that alignak will be able to find all the daemons configuration in this -# whatever the number of daemons existing in the configuration -# -# Each section defines: -# - the location of the daemon configuration file -# - the daemon launching script -# - the location of the daemon pid file -# - the location of the daemon debug log file (if any is to be used) - -[arbiter-master] -### ARBITER PART ### -PROCESS=alignak-arbiter -DAEMON=alignak-arbiter -CFG=%(ETC)s/daemons/arbiterd.ini -DEBUGFILE=%(LOG)s/arbiter-debug.log - - -[scheduler-master] -### SCHEDULER PART ### -PROCESS=alignak-scheduler -DAEMON=alignak-scheduler -CFG=%(ETC)s/daemons/schedulerd.ini -DEBUGFILE=%(LOG)s/scheduler-debug.log - -[poller-master] -### POLLER PART ### -PROCESS=alignak-poller -DAEMON=alignak-poller -CFG=%(ETC)s/daemons/pollerd.ini -DEBUGFILE=%(LOG)s/poller-debug.log - -[reactionner-master] -### REACTIONNER PART ### -PROCESS=alignak-reactionner -DAEMON=alignak-reactionner -CFG=%(ETC)s/daemons/reactionnerd.ini -DEBUGFILE=%(LOG)s/reactionner-debug.log - -[broker-master] -### BROKER PART ### -PROCESS=alignak-broker -DAEMON=alignak-broker -CFG=%(ETC)s/daemons/brokerd.ini -DEBUGFILE=%(LOG)s/broker-debug.log - -[receiver-master] -### RECEIVER PART ### -PROCESS=alignak-receiver -DAEMON=alignak-receiver -CFG=%(ETC)s/daemons/receiverd.ini -DEBUGFILE=%(LOG)s/receiver-debug.log +; Alignak monitored system configuration files +; Declaring such configuration files is useful if you have some items declared in plain-old +; legacy configuration files (eg. Nagios, Shinken, ...) +; --- +; All the variables starting with 'cfg' are considered as some configuration files and will +; be parsed according to the Nagios parsing rules +; --- +; First configuration file +;CFG=%(etcdir)s/alignak.cfg +; Second configuration file +;CFG2=%(etcdir)s/macros.cfg