├── .bintray-deb.json ├── .bintray-freebsd.json ├── .bintray-rpm.json ├── .gitattributes ├── .gitignore ├── .landscape.yml ├── .pylintrc ├── .travis.yml ├── AUTHORS ├── LICENSE ├── MANIFEST.in ├── README.rst ├── alignak_backend ├── __init__.py ├── app.py ├── carboniface.py ├── grafana.py ├── livesynthesis.py ├── main.py ├── models │ ├── __init__.py │ ├── actionacknowledge.py │ ├── actiondowntime.py │ ├── actionforcecheck.py │ ├── alignak.py │ ├── alignak_notifications.py │ ├── alignakdaemon.py │ ├── alignakretention.py │ ├── command.py │ ├── grafana.py │ ├── graphite.py │ ├── history.py │ ├── host.py │ ├── hostdependency.py │ ├── hostescalation.py │ ├── hostgroup.py │ ├── influxdb.py │ ├── livesynthesis.py │ ├── livesynthesisretention.py │ ├── logcheckresult.py │ ├── realm.py │ ├── service.py │ ├── servicedependency.py │ ├── serviceescalation.py │ ├── servicegroup.py │ ├── statsd.py │ ├── timeperiod.py │ ├── timeseriesretention.py │ ├── user.py │ ├── usergroup.py │ └── userrestrictrole.py ├── perfdata.py ├── scheduler.py ├── swagger-ui │ ├── __init__.py │ ├── css │ │ ├── print.css │ │ ├── reset.css │ │ ├── screen.css │ │ ├── style.css │ │ └── typography.css │ ├── fonts │ │ ├── DroidSans-Bold.ttf │ │ └── DroidSans.ttf │ ├── images │ │ ├── collapse.gif │ │ ├── expand.gif │ │ ├── explorer_icons.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ ├── logo_small.png │ │ ├── pet_store_api.png │ │ ├── throbber.gif │ │ └── wordnik_api.png │ ├── index.html │ ├── lang │ │ ├── ca.js │ │ ├── el.js │ │ ├── en.js │ │ ├── es.js │ │ ├── fr.js │ │ ├── geo.js │ │ ├── it.js │ │ ├── ja.js │ │ ├── ko-kr.js │ │ ├── pl.js │ │ ├── pt.js │ │ ├── ru.js │ │ ├── tr.js │ │ ├── translator.js │ │ └── zh-cn.js │ ├── lib │ │ ├── backbone-min.js │ │ ├── es5-shim.js │ │ ├── handlebars-2.0.0.js │ │ ├── handlebars-4.0.5.js │ │ ├── highlight.7.3.pack.js │ │ ├── highlight.9.1.0.pack.js │ │ ├── highlight.9.1.0.pack_extended.js │ │ ├── jquery-1.8.0.min.js │ │ ├── jquery.ba-bbq.min.js │ │ ├── jquery.slideto.min.js │ │ ├── jquery.wiggle.min.js │ │ ├── js-yaml.min.js │ │ ├── jsoneditor.min.js │ │ ├── lodash.min.js │ │ ├── marked.js │ │ ├── object-assign-pollyfill.js │ │ ├── sanitize-html.min.js │ │ ├── swagger-oauth.js │ │ ├── underscore-min.js │ │ └── underscore-min.map │ ├── o2c.html │ ├── swagger-ui.js │ └── swagger-ui.min.js ├── template.py └── timeseries.py ├── bin ├── alignak-backend-uwsgi ├── log-rotate-alignak-backend ├── log-rotate-uwsgi ├── python-post-install.sh ├── python3-post-install.sh ├── rc.d │ └── alignak-backend └── systemd │ ├── README │ ├── python2 │ ├── alignak-backend-centos7.service │ └── alignak-backend.service │ └── python3 │ ├── alignak-backend-centos7.service │ └── alignak-backend.service ├── code_test.sh ├── docs ├── Makefile ├── _static │ ├── actionacknowledge.png │ ├── actiondowntime.png │ ├── actionforcecheck.png │ ├── alignakretention.png │ ├── architecture_schema.png │ ├── architecture_schema.svg │ ├── configalignak.png │ ├── configalignak_notifications.png │ ├── configcommand.png │ ├── confighost.png │ ├── confighostdependency.png │ ├── confighostescalation.png │ ├── confighostgroup.png │ ├── configrealm.png │ ├── configservice.png │ ├── configservicedependency.png │ ├── configserviceescalation.png │ ├── configservicegroup.png │ ├── configtimeperiod.png │ ├── configuser.png │ ├── configusergroup.png │ ├── css │ │ └── mystyle.css │ ├── log_history.png │ ├── log_logcheckresult.png │ ├── ls_alignakdaemon.png │ ├── ls_livesynthesis.png │ ├── ls_livesynthesisretention.png │ ├── retentionhost.png │ ├── retentionservice.png │ ├── ts_grafana.png │ ├── ts_graphite.png │ ├── ts_influxdb.png │ ├── ts_statsd.png │ ├── ts_timeseriesretention.png │ └── userrestrictrole.png ├── api.rst ├── architecture.rst ├── conf.py ├── configuration.rst ├── features.rst ├── index.rst ├── install.rst ├── intro.rst ├── models_to_rst.py ├── resources.rst ├── resources │ ├── actionacknowledge.rst │ ├── actiondowntime.rst │ ├── actionforcecheck.rst │ ├── alignakretention.rst │ ├── config_alignak.rst │ ├── config_alignak_notifications.rst │ ├── config_command.rst │ ├── config_host.rst │ ├── config_hostdependency.rst │ ├── config_hostescalation.rst │ ├── config_hostgroup.rst │ ├── config_realm.rst │ ├── config_service.rst │ ├── config_servicedependency.rst │ ├── config_serviceescalation.rst │ ├── config_servicegroup.rst │ ├── config_timeperiod.rst │ ├── config_user.rst │ ├── config_usergroup.rst │ ├── log_history.rst │ ├── log_logcheckresult.rst │ ├── ls_alignakdaemon.rst │ ├── ls_livesynthesis.rst │ ├── ls_livesynthesisretention.rst │ ├── ts_grafana.rst │ ├── ts_graphite.rst │ ├── ts_influxdb.rst │ ├── ts_statsd.rst │ ├── ts_timeseriesretention.rst │ └── userrestrictrole.rst ├── run.rst └── tutorial.rst ├── etc ├── alignak-backend-logger.json ├── alignak-backend.wsgi ├── grafana_queries.json ├── grafana_tables.json ├── settings.json ├── uwsgi-service.ini └── uwsgi.ini ├── package.sh ├── requirements.txt ├── setup.py ├── test ├── .coveragerc ├── alignak_cfg_files │ ├── contact_admin.cfg │ ├── hosts.cfg │ ├── hosts2.cfg │ ├── hosts_custom_variables.cfg │ ├── hosts_links_hostgroup.cfg │ ├── hosts_links_parent.cfg │ ├── timeperiods.cfg │ └── timeperiods_complex.cfg ├── alignakbackend.py ├── cfg │ ├── command_http.json │ ├── command_https.json │ ├── command_notification_host.json │ ├── command_notification_service.json │ ├── command_ping.json │ ├── command_ssh.json │ ├── default │ │ ├── _main.cfg │ │ ├── arbiters │ │ │ └── arbiter-master.cfg │ │ ├── brokers │ │ │ └── broker-master.cfg │ │ ├── certs │ │ │ ├── README │ │ │ ├── ca.pem │ │ │ ├── index.txt │ │ │ ├── index.txt.attr │ │ │ ├── index.txt.old │ │ │ ├── newcerts │ │ │ │ └── 1000.pem │ │ │ ├── openssl.conf │ │ │ ├── private │ │ │ │ └── cakey.pem │ │ │ ├── serial │ │ │ ├── serial.old │ │ │ ├── server-req.pem │ │ │ ├── server.cert │ │ │ └── server.key │ │ ├── commands │ │ │ ├── check_dig.cfg │ │ │ ├── check_host_alive.cfg │ │ │ ├── check_nrpe.cfg │ │ │ ├── check_nrpe_args.cfg │ │ │ ├── check_ping.cfg │ │ │ ├── check_snmp_service.cfg │ │ │ ├── check_snmp_storage.cfg │ │ │ ├── check_snmp_time.cfg │ │ │ ├── check_tcp.cfg │ │ │ ├── configuration-check.cfg │ │ │ ├── detailled-host-by-email.cfg │ │ │ ├── detailled-service-by-email.cfg │ │ │ ├── notify-host-by-android-sms.cfg │ │ │ ├── notify-host-by-email.cfg │ │ │ ├── notify-host-by-slack.cfg │ │ │ ├── notify-host-by-xmpp.cfg │ │ │ ├── notify-service-by-android-sms.cfg │ │ │ ├── notify-service-by-email.cfg │ │ │ ├── notify-service-by-slack.cfg │ │ │ ├── notify-service-by-xmpp.cfg │ │ │ ├── reload-shinken.cfg │ │ │ └── restart-shinken.cfg │ │ ├── contactgroups │ │ │ ├── admins.cfg │ │ │ └── users.cfg │ │ ├── contacts │ │ │ ├── admin.cfg │ │ │ ├── anonymous.cfg │ │ │ ├── fred.cfg │ │ │ └── guest.cfg │ │ ├── daemons │ │ │ ├── brokerd.ini │ │ │ ├── pollerd.ini │ │ │ ├── reactionnerd.ini │ │ │ ├── receiverd.ini │ │ │ └── schedulerd.ini │ │ ├── dependencies │ │ │ ├── dependencies.cfg │ │ │ └── sample.cfg │ │ ├── discovery │ │ │ ├── discovery.cfg │ │ │ ├── discovery_rules.cfg │ │ │ └── discovery_runs.cfg │ │ ├── escalations │ │ │ └── sample.cfg │ │ ├── hostgroups │ │ │ ├── linux.cfg │ │ │ └── test.cfg │ │ ├── hosts │ │ │ ├── graphite.cfg │ │ │ ├── knm-glpi.cfg │ │ │ ├── knm-shinken.cfg │ │ │ ├── localhost.cfg │ │ │ ├── main.cfg │ │ │ ├── pi1.cfg │ │ │ ├── pi2.cfg │ │ │ ├── site-1 │ │ │ │ ├── sim-vm.cfg │ │ │ │ └── site-1.cfg │ │ │ ├── spare.cfg │ │ │ └── switch.cfg │ │ ├── modules │ │ │ ├── auth-ws-glpi.cfg │ │ │ ├── dashkiosk.cfg │ │ │ ├── elastic-logs.cfg │ │ │ ├── glpi-helpdesk.cfg │ │ │ ├── glpidb.cfg │ │ │ ├── graphite2.cfg │ │ │ ├── import-glpi.cfg │ │ │ ├── mongo-logs.cfg │ │ │ ├── named_pipe.cfg │ │ │ ├── nsca.cfg │ │ │ ├── pickle-retention-file-scheduler.cfg │ │ │ ├── retention-mongodb.cfg │ │ │ ├── sample.cfg │ │ │ ├── simple-log.cfg │ │ │ ├── statsd.cfg │ │ │ ├── ui-graphite2.cfg │ │ │ ├── webui2.cfg │ │ │ └── ws_arbiter.cfg │ │ ├── notificationways │ │ │ ├── detailled-email.cfg │ │ │ ├── email.cfg │ │ │ ├── slack.cfg │ │ │ └── sms-android.cfg │ │ ├── packs │ │ │ ├── glances │ │ │ │ ├── commands.cfg │ │ │ │ ├── glances.pack │ │ │ │ ├── services │ │ │ │ │ ├── cpu.cfg │ │ │ │ │ ├── fs.cfg │ │ │ │ │ ├── load.cfg │ │ │ │ │ ├── memory.cfg │ │ │ │ │ ├── net.cfg │ │ │ │ │ ├── swap.cfg │ │ │ │ │ ├── system.cfg │ │ │ │ │ └── uptime.cfg │ │ │ │ └── templates.cfg │ │ │ ├── http │ │ │ │ ├── commands.cfg │ │ │ │ ├── discovery.cfg │ │ │ │ ├── services │ │ │ │ │ ├── certificate.cfg │ │ │ │ │ ├── http.cfg │ │ │ │ │ └── https.cfg │ │ │ │ └── templates.cfg │ │ │ ├── kiosks │ │ │ │ ├── commands.cfg │ │ │ │ ├── services.cfg │ │ │ │ └── templates.cfg │ │ │ ├── linux-snmp │ │ │ │ ├── commands.cfg │ │ │ │ ├── discovery.cfg │ │ │ │ ├── linux-snmp.pack │ │ │ │ ├── services │ │ │ │ │ ├── cpu.cfg │ │ │ │ │ ├── disks.cfg │ │ │ │ │ ├── load.cfg │ │ │ │ │ ├── logFiles.cfg_unused │ │ │ │ │ ├── memory.cfg │ │ │ │ │ ├── network_usage.cfg │ │ │ │ │ └── time.cfg_unused │ │ │ │ └── templates.cfg │ │ │ ├── readme.cfg │ │ │ ├── san-switch │ │ │ │ ├── commands.cfg │ │ │ │ ├── discovery.cfg │ │ │ │ ├── services │ │ │ │ │ ├── san_switch_sensors.cfg │ │ │ │ │ └── san_switch_status.cfg │ │ │ │ └── templates.cfg │ │ │ ├── shinken2 │ │ │ │ ├── arbiter2.pack │ │ │ │ ├── commands.cfg │ │ │ │ ├── services │ │ │ │ │ └── services.cfg │ │ │ │ └── templates.cfg │ │ │ ├── switch │ │ │ │ ├── commands.cfg │ │ │ │ ├── discovery.cfg │ │ │ │ ├── services │ │ │ │ │ ├── interface_errors.cfg │ │ │ │ │ ├── interface_status.cfg │ │ │ │ │ └── interface_usage.cfg │ │ │ │ ├── switch.pack │ │ │ │ └── templates.cfg │ │ │ ├── vmware │ │ │ │ ├── cluster │ │ │ │ │ ├── commands.cfg │ │ │ │ │ ├── discovery.cfg │ │ │ │ │ ├── services │ │ │ │ │ │ ├── cpu.cfg │ │ │ │ │ │ ├── issues.cfg │ │ │ │ │ │ └── mem.cfg │ │ │ │ │ └── templates.cfg │ │ │ │ ├── esx │ │ │ │ │ ├── commands.cfg │ │ │ │ │ ├── discovery.cfg │ │ │ │ │ ├── services │ │ │ │ │ │ ├── cpu.cfg │ │ │ │ │ │ ├── io.cfg │ │ │ │ │ │ ├── mem.cfg │ │ │ │ │ │ └── net.cfg │ │ │ │ │ └── templates.cfg │ │ │ │ ├── templates.cfg │ │ │ │ ├── vcenter │ │ │ │ │ ├── commands.cfg │ │ │ │ │ ├── discovery.cfg │ │ │ │ │ ├── services │ │ │ │ │ │ ├── snapshots_age.cfg │ │ │ │ │ │ ├── snapshots_count.cfg │ │ │ │ │ │ ├── tools.cfg │ │ │ │ │ │ └── vmfs.cfg │ │ │ │ │ └── templates.cfg │ │ │ │ ├── vm │ │ │ │ │ ├── commands.cfg │ │ │ │ │ ├── discovery.cfg │ │ │ │ │ ├── services │ │ │ │ │ │ ├── cpu.cfg │ │ │ │ │ │ ├── disk.cfg │ │ │ │ │ │ ├── io.cfg │ │ │ │ │ │ ├── mem.cfg │ │ │ │ │ │ └── net.cfg │ │ │ │ │ └── templates.cfg │ │ │ │ ├── vmware.pack │ │ │ │ └── windows-vcenter │ │ │ │ │ ├── commands.cfg │ │ │ │ │ ├── discovery.cfg │ │ │ │ │ ├── services │ │ │ │ │ └── vcservices.cfg │ │ │ │ │ └── templates.cfg │ │ │ └── windows │ │ │ │ ├── commands.cfg │ │ │ │ ├── discovery.cfg │ │ │ │ ├── services │ │ │ │ ├── big_processes.cfg │ │ │ │ ├── cpu.cfg │ │ │ │ ├── disks.cfg │ │ │ │ ├── disks_io.cfg │ │ │ │ ├── each_cpu.cfg │ │ │ │ ├── eventlogs_applications.cfg_unused │ │ │ │ ├── eventlogs_system.cfg_unused │ │ │ │ ├── inactive_sessions.cfg │ │ │ │ ├── load_average.cfg │ │ │ │ ├── network_interface.cfg │ │ │ │ ├── physical_memory.cfg │ │ │ │ ├── reboot.cfg │ │ │ │ ├── services.cfg │ │ │ │ ├── share_space.cfg │ │ │ │ └── swap.cfg_unused │ │ │ │ ├── templates.cfg │ │ │ │ └── windows.pack │ │ ├── pollers │ │ │ └── poller-master.cfg │ │ ├── reactionners │ │ │ ├── reactionner-android-sms.cfg │ │ │ └── reactionner-master.cfg │ │ ├── realms │ │ │ └── all.cfg │ │ ├── receivers │ │ │ └── receiver-master.cfg │ │ ├── resource.d │ │ │ ├── active-directory.cfg │ │ │ ├── nmap.cfg │ │ │ ├── paths.cfg │ │ │ ├── snmp.cfg │ │ │ ├── vmware.cfg │ │ │ └── wmi.cfg │ │ ├── sample │ │ │ ├── hostgroups.cfg │ │ │ ├── hosts │ │ │ │ ├── br-erp.cfg │ │ │ │ ├── srv-collectd.cfg │ │ │ │ ├── srv-emc-clariion.cfg │ │ │ │ ├── srv-esx.cfg │ │ │ │ ├── srv-exchange-cas.cfg │ │ │ │ ├── srv-exchange-ht.cfg │ │ │ │ ├── srv-exchange-mb.cfg │ │ │ │ ├── srv-exchange-um.cfg │ │ │ │ ├── srv-iis.cfg │ │ │ │ ├── srv-linux.cfg │ │ │ │ ├── srv-microsoft-dc.cfg │ │ │ │ ├── srv-mongodb.cfg │ │ │ │ ├── srv-mysql.cfg │ │ │ │ ├── srv-netapp.cfg │ │ │ │ ├── srv-newyork.cfg │ │ │ │ ├── srv-oracle.cfg │ │ │ │ ├── srv-postgresql.cfg │ │ │ │ ├── srv-vmware-vm.cfg │ │ │ │ ├── srv-web-avg.cfg │ │ │ │ ├── srv-webserver.cfg │ │ │ │ ├── srv-windows.cfg │ │ │ │ └── switch-cisco.cfg │ │ │ ├── services │ │ │ │ └── eue_glpi.cfg │ │ │ └── triggers.d │ │ │ │ └── avg_http.trig │ │ ├── schedulers │ │ │ └── scheduler-master.cfg │ │ ├── servicegroups │ │ │ ├── sample.cfg │ │ │ └── test.cfg │ │ ├── services │ │ │ └── services.cfg │ │ ├── templates │ │ │ ├── generic-contact.cfg │ │ │ ├── generic-host.cfg │ │ │ ├── generic-service.cfg │ │ │ ├── slack-contact.cfg │ │ │ ├── smbits-http.cfg │ │ │ ├── smbits-https.cfg │ │ │ ├── srv-pnp.cfg │ │ │ └── time_templates.cfg │ │ └── timeperiods │ │ │ ├── 24x7.cfg │ │ │ ├── none.cfg │ │ │ ├── us-holidays.cfg │ │ │ └── workhours.cfg │ ├── grafana_queries.json │ ├── grafana_tables.json │ ├── host_srv001.json │ ├── host_template.json │ ├── host_template_ping.json │ ├── pack-linux-nrpe │ │ ├── commands.json │ │ ├── hosts-templates.json │ │ ├── services-templates.json │ │ └── setup.sh │ ├── service_srv001_ping.json │ ├── service_srv002_ping.json │ └── settings │ │ ├── alignak-backend-logger.json │ │ ├── settings.json │ │ ├── settings_cron.json │ │ ├── settings_escaped_slashes.json │ │ ├── settings_livesynthesis_history.json │ │ ├── settings_old_version.json │ │ ├── settings_uncommented.json │ │ ├── settings_unescaped.json │ │ └── uwsgi.ini ├── requirements.txt ├── setup_test.sh ├── test_actions.py ├── test_alignak.py ├── test_alignakretention.py ├── test_commands.py ├── test_config.py ├── test_customs.py ├── test_grafana.py ├── test_grafana_datasource.py ├── test_groups.py ├── test_history.py ├── test_hook_alias_fill.py ├── test_hook_livesynthesis.py ├── test_hook_template.py ├── test_host_service_creation.py ├── test_host_service_deletion.py ├── test_hostescalation.py ├── test_keep_default_items.py ├── test_livesynthesis_history.py ├── test_logcheckresult.py ├── test_login.py ├── test_models.py ├── test_overall_state.py ├── test_realms.py ├── test_recalculate_livesynthesis.py ├── test_rights.py ├── test_run.py ├── test_service_template_error.py ├── test_service_template_for_host_template.py ├── test_serviceescalation.py ├── test_templates_updates.py ├── test_timeseries.py ├── test_user_management.py ├── test_user_uipreferences.py ├── test_userrestrict.py └── test_zzz_alignak_notification.py └── tools ├── generate_model_graph.py ├── model_schema └── model_schema.png /.bintray-deb.json: -------------------------------------------------------------------------------- 1 | { 2 | "package": { 3 | "name": "sed_package_name", 4 | "repo": "sed_version_repo", 5 | "subject": "alignak", 6 | "desc": "Alignak REST API and MongoDB backend", 7 | "vcs_url": "https://github.com/Alignak-monitoring-contrib/alignak-backend.git", 8 | "website_url": "http://alignak.net", 9 | "issue_tracker_url": "https://github.com/Alignak-monitoring-contrib/alignak-backend/issues", 10 | "labels": ["alignak", "backend", "nagios", "monitoring", "REST", "MongoDB"], 11 | "licenses": ["AGPL-V3"] 12 | }, 13 | "version": { 14 | "name": "sed_version_name", 15 | "desc": "sed_version_desc", 16 | "released": "sed_version_released" 17 | }, 18 | "files": [ 19 | { 20 | "includePattern": "./dist/(.*\\.deb)", 21 | "uploadPattern": "$1", 22 | "matrixParams": { 23 | "override": "1", 24 | "deb_distribution": "jessie,Stretch,Trusty,xenial,Yakkety,Zesty,Artful", 25 | "deb_component": "main", 26 | "deb_architecture": "all" 27 | } 28 | } 29 | ], 30 | "publish": true 31 | } -------------------------------------------------------------------------------- /.bintray-freebsd.json: -------------------------------------------------------------------------------- 1 | { 2 | "package": { 3 | "name": "sed_package_name", 4 | "repo": "sed_version_repo", 5 | "subject": "alignak", 6 | "desc": "Alignak REST API and MongoDB backend", 7 | "vcs_url": "https://github.com/Alignak-monitoring-contrib/alignak-backend.git", 8 | "website_url": "http://alignak.net", 9 | "issue_tracker_url": "https://github.com/Alignak-monitoring-contrib/alignak-backend/issues", 10 | "labels": ["alignak", "backend", "nagios", "monitoring", "REST", "MongoDB"], 11 | "licenses": ["AGPL-V3"] 12 | }, 13 | "version": { 14 | "name": "sed_version_name", 15 | "desc": "sed_version_desc", 16 | "released": "sed_version_released" 17 | }, 18 | "files": [ 19 | { 20 | "includePattern": "./dist/(.*\\.txz)", 21 | "uploadPattern": "$1", 22 | "matrixParams": { 23 | "override": 1 24 | } 25 | } 26 | ], 27 | "publish": true 28 | } -------------------------------------------------------------------------------- /.bintray-rpm.json: -------------------------------------------------------------------------------- 1 | { 2 | "package": { 3 | "name": "sed_package_name", 4 | "repo": "sed_version_repo", 5 | "subject": "alignak", 6 | "desc": "Alignak REST API and MongoDB backend", 7 | "vcs_url": "https://github.com/Alignak-monitoring-contrib/alignak-backend.git", 8 | "website_url": "http://alignak.net", 9 | "issue_tracker_url": "https://github.com/Alignak-monitoring-contrib/alignak-backend/issues", 10 | "labels": ["alignak", "backend", "nagios", "monitoring", "REST", "MongoDB"], 11 | "licenses": ["AGPL-V3"] 12 | }, 13 | "version": { 14 | "name": "sed_version_name", 15 | "desc": "sed_version_desc", 16 | "released": "sed_version_released" 17 | }, 18 | "files": [ 19 | { 20 | "includePattern": "./dist/(.*\\.rpm)", 21 | "uploadPattern": "$1", 22 | "matrixParams": { 23 | "override": 1 24 | } 25 | } 26 | ], 27 | "publish": true 28 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Autodetect text files 2 | * text=auto 3 | 4 | # Force the text files to have unix eols, so Windows does not break them 5 | * text eol=lf 6 | 7 | # ...Unless the name matches the following 8 | # overriding patterns 9 | 10 | # Definitively text files 11 | *.rst text 12 | *.cfg text 13 | *.py text 14 | *.sh text 15 | 16 | # Ensure those won't be messed up with 17 | *.jpg binary 18 | *.png binary 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Distribution / packaging 9 | .Python 10 | env/ 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | #lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | *.egg-info/ 23 | .installed.cfg 24 | *.egg 25 | 26 | # PyInstaller 27 | # Usually these files are written by a python script from a template 28 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 29 | *.manifest 30 | *.spec 31 | 32 | # Installer logs 33 | pip-log.txt 34 | pip-delete-this-directory.txt 35 | 36 | # Unit test / coverage reports 37 | htmlcov/ 38 | .tox/ 39 | .coverage 40 | .coverage.* 41 | .cache 42 | nosetests.xml 43 | coverage.xml 44 | *,cover 45 | 46 | # Translations 47 | *.mo 48 | *.pot 49 | 50 | # Django stuff: 51 | *.log 52 | 53 | # Sphinx documentation 54 | docs/_build/ 55 | 56 | # PyBuilder 57 | target/ 58 | -------------------------------------------------------------------------------- /.landscape.yml: -------------------------------------------------------------------------------- 1 | doc-warnings: true 2 | test-warnings: false 3 | strictness: medium 4 | max-line-length: 100 5 | autodetect: true 6 | pycodestyle: 7 | full: true 8 | pep257: 9 | run: false 10 | mccabe: 11 | run: false 12 | requirements: 13 | - requirements.txt 14 | python-targets: 15 | - 2 16 | - 3 17 | ignore-paths: 18 | - docs 19 | - test 20 | ignore-patterns: 21 | # This file is only defining the imported Alignak version 22 | - alignak_backend/__init__.py 23 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Main developpers: 2 | - David Durieux 3 | 4 | 5 | Contributors: 6 | - Frédéric MOHIER 7 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst LICENSE AUTHORS requirements.txt 2 | include etc/settings.json 3 | include etc/uwsgi.ini 4 | recursive-include alignak_backend *.* 5 | include bin/alignak-backend-uwsgi 6 | include bin/rc.d/alignak-backend 7 | global-exclude *pyc -------------------------------------------------------------------------------- /alignak_backend/main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | Main 5 | """ 6 | from __future__ import print_function 7 | 8 | from alignak_backend.app import app, manifest 9 | 10 | 11 | def main(): # pragma: no cover - tested but not covered 12 | """Main function to run the alignak backend 13 | 14 | This function is used by the `alignak-backend` script installed with setup.py. 15 | It is intended to run the backend in a single process mode. This mode is not 16 | recommended for production but may be useful in development to avoid setting-up 17 | an uWSGI server. 18 | """ 19 | try: 20 | host = app.config.get('HOST', '127.0.0.1') 21 | if not host: 22 | host = '0.0.0.0' 23 | port = app.config.get('PORT', 5000) 24 | url = "http://%s:%d" % (host, port) 25 | print("--------------------------------------------------------------------------------") 26 | print("%s, listening on %s" % (manifest['name'], url)) 27 | print("--------------------------------------------------------------------------------") 28 | app.run(host=host, port=port, debug=app.config.get('DEBUG', False)) 29 | except Exception as e: 30 | print("Application run failed, exception: %s / %s" % (type(e), str(e))) 31 | 32 | 33 | if __name__ == "__main__": # pragma: no cover 34 | main() 35 | -------------------------------------------------------------------------------- /alignak_backend/models/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | Load resources schema 5 | """ 6 | import pkgutil 7 | from importlib import import_module 8 | 9 | 10 | def register_models(): 11 | """ 12 | Get all resources in files of this folder and return name + schema 13 | 14 | :return: 15 | """ 16 | domain = {} 17 | files = pkgutil.walk_packages(path=__path__, prefix=__name__ + '.') 18 | for _, modname, _ in files: 19 | mod = import_module(modname) 20 | domain[mod.get_name()] = mod.get_schema() 21 | return domain 22 | -------------------------------------------------------------------------------- /alignak_backend/models/alignakretention.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | Resource information of alignakretention 5 | """ 6 | 7 | 8 | def get_name(friendly=False): 9 | """Get name of this resource 10 | 11 | :return: name of this resource 12 | :rtype: str 13 | """ 14 | if friendly: # pragma: no cover 15 | return 'Host/service data retention from scheduler of Alignak' 16 | return 'alignakretention' 17 | 18 | 19 | def get_doc(): # pragma: no cover 20 | """Get documentation of this resource 21 | 22 | :return: rst string 23 | :rtype: str 24 | """ 25 | return """ 26 | The ``alignakretention`` model is used by the Alignak backend scheduler module for the 27 | Alignak retention feature. 28 | """ 29 | 30 | 31 | def get_schema(): 32 | """Schema structure of this resource 33 | 34 | :return: schema dictionary 35 | :rtype: dict 36 | """ 37 | return { 38 | 'allow_unknown': True, 39 | 'auth_field': '_user', 40 | 'item_methods': ['GET', 'PATCH', 'PUT', 'DELETE'], 41 | 'schema': { 42 | 'schema_version': { 43 | 'type': 'integer', 44 | 'default': 1, 45 | }, 46 | 'host': { 47 | 'schema_version': 1, 48 | 'type': 'string', 49 | }, 50 | '_user': { 51 | 'schema_version': 1, 52 | 'type': 'objectid', 53 | 'data_relation': { 54 | 'resource': 'user', 55 | 'embeddable': True 56 | }, 57 | } 58 | }, 59 | 'schema_deleted': {} 60 | } 61 | -------------------------------------------------------------------------------- /alignak_backend/scheduler.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | ``alignak_backend.scheduler`` module 6 | 7 | This module manages the scheduler jobs 8 | """ 9 | import alignak_backend.app 10 | 11 | 12 | def cron_alignak(): 13 | """ 14 | It's the scheduler used to notify Alignak 15 | 16 | :return: None 17 | """ 18 | alignak_backend.app.cron_alignak() 19 | 20 | 21 | def cron_cache(): 22 | """ 23 | It's the scheduler used to send to graphite / influxdb retention perfdata if previously 24 | graphite / influxdb wasn't available 25 | 26 | :return: None 27 | """ 28 | # test communication and see if data in cache 29 | alignak_backend.app.cron_timeseries() 30 | 31 | 32 | def cron_grafana(): 33 | """ 34 | It's the scheduler used to update / create grafana dashboards 35 | 36 | :return: None 37 | """ 38 | alignak_backend.app.cron_grafana() 39 | 40 | 41 | def cron_livesynthesis_history(): 42 | """ 43 | It's the scheduler used to manage retention / history of livesynthesis 44 | 45 | :return: None 46 | """ 47 | alignak_backend.app.cron_livesynthesis_history() 48 | -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/css/reset.css: -------------------------------------------------------------------------------- 1 | a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0} -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/css/typography.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/alignak_backend/swagger-ui/css/typography.css -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/fonts/DroidSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/alignak_backend/swagger-ui/fonts/DroidSans-Bold.ttf -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/fonts/DroidSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/alignak_backend/swagger-ui/fonts/DroidSans.ttf -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/images/collapse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/alignak_backend/swagger-ui/images/collapse.gif -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/images/expand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/alignak_backend/swagger-ui/images/expand.gif -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/images/explorer_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/alignak_backend/swagger-ui/images/explorer_icons.png -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/images/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/alignak_backend/swagger-ui/images/favicon-16x16.png -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/images/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/alignak_backend/swagger-ui/images/favicon-32x32.png -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/alignak_backend/swagger-ui/images/favicon.ico -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/images/logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/alignak_backend/swagger-ui/images/logo_small.png -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/images/pet_store_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/alignak_backend/swagger-ui/images/pet_store_api.png -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/images/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/alignak_backend/swagger-ui/images/throbber.gif -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/images/wordnik_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/alignak_backend/swagger-ui/images/wordnik_api.png -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/lang/translator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Translator for documentation pages. 5 | * 6 | * To enable translation you should include one of language-files in your index.html 7 | * after . 8 | * For example - 9 | * 10 | * If you wish to translate some new texts you should do two things: 11 | * 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too. 12 | * 2. Mark that text it templates this way New Phrase or . 13 | * The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate. 14 | * 15 | */ 16 | window.SwaggerTranslator = { 17 | 18 | _words:[], 19 | 20 | translate: function(sel) { 21 | var $this = this; 22 | sel = sel || '[data-sw-translate]'; 23 | 24 | $(sel).each(function() { 25 | $(this).html($this._tryTranslate($(this).html())); 26 | 27 | $(this).val($this._tryTranslate($(this).val())); 28 | $(this).attr('title', $this._tryTranslate($(this).attr('title'))); 29 | }); 30 | }, 31 | 32 | _tryTranslate: function(word) { 33 | return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word; 34 | }, 35 | 36 | learn: function(wordsMap) { 37 | this._words = wordsMap; 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/lib/highlight.9.1.0.pack_extended.js: -------------------------------------------------------------------------------- 1 | "use strict";!function(){var h,l;h=hljs.configure,hljs.configure=function(l){var i=l.highlightSizeThreshold;hljs.highlightSizeThreshold=i===+i?i:null,h.call(this,l)},l=hljs.highlightBlock,hljs.highlightBlock=function(h){var i=h.innerHTML,g=hljs.highlightSizeThreshold;(null==g||g>i.length)&&l.call(hljs,h)}}(); -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/lib/jquery.slideto.min.js: -------------------------------------------------------------------------------- 1 | !function(i){i.fn.slideto=function(o){return o=i.extend({slide_duration:"slow",highlight_duration:3e3,highlight:!0,highlight_color:"#FFFF99"},o),this.each(function(){obj=i(this),i("body").animate({scrollTop:obj.offset().top},o.slide_duration,function(){o.highlight&&i.ui.version&&obj.effect("highlight",{color:o.highlight_color},o.highlight_duration)})})}}(jQuery); -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/lib/jquery.wiggle.min.js: -------------------------------------------------------------------------------- 1 | jQuery.fn.wiggle=function(e){var a={speed:50,wiggles:3,travel:5,callback:null},e=jQuery.extend(a,e);return this.each(function(){var a=this,l=(jQuery(this).wrap('
').css("position","relative"),0);for(i=1;i<=e.wiggles;i++)jQuery(this).animate({left:"-="+e.travel},e.speed).animate({left:"+="+2*e.travel},2*e.speed).animate({left:"-="+e.travel},e.speed,function(){l++,jQuery(a).parent().hasClass("wiggle-wrap")&&jQuery(a).parent().replaceWith(a),l==e.wiggles&&jQuery.isFunction(e.callback)&&e.callback()})})}; -------------------------------------------------------------------------------- /alignak_backend/swagger-ui/lib/object-assign-pollyfill.js: -------------------------------------------------------------------------------- 1 | "function"!=typeof Object.assign&&!function(){Object.assign=function(n){"use strict";if(void 0===n||null===n)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(n),o=1;o 2 | var qp = null; 3 | if(window.location.hash && window.location.hash !== "#_=_") { 4 | qp = location.hash.substring(1); 5 | } 6 | else { 7 | qp = location.search.substring(1); 8 | } 9 | qp = qp ? JSON.parse('{"' + qp.replace(/&/g, '","').replace(/=/g,'":"') + '"}', 10 | function(key, value) { 11 | return key===""?value:decodeURIComponent(value) } 12 | ):{} 13 | 14 | if (window.opener.swaggerUiAuth.tokenUrl) 15 | window.opener.processOAuthCode(qp); 16 | else 17 | window.opener.onOAuthComplete(qp); 18 | 19 | window.close(); 20 | 21 | -------------------------------------------------------------------------------- /bin/alignak-backend-uwsgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ ${ALIGNAK_BACKEND_UWSGI_FILE} ]; then 3 | ALIGNAK_BACKEND_UWSGI_CFG="$ALIGNAK_BACKEND_UWSGI_FILE" 4 | else 5 | ALIGNAK_BACKEND_UWSGI_CFG="/usr/local/share/alignak-backend/etc/uwsgi.ini" 6 | fi 7 | echo "Alignak backend uWSGI configuration file: ${ALIGNAK_BACKEND_UWSGI_CFG}" 8 | 9 | if [ ${ALIGNAK_BACKEND_CONFIGURATION_FILE} ]; then 10 | ALIGNAK_BACKEND_CFG="$ALIGNAK_BACKEND_CONFIGURATION_FILE" 11 | else 12 | ALIGNAK_BACKEND_CFG="/usr/local/share/alignak-backend/etc/settings.json" 13 | fi 14 | echo "Alignak backend configuration file: ${ALIGNAK_BACKEND_CFG}" 15 | 16 | uwsgi --ini "$ALIGNAK_BACKEND_UWSGI_CFG" -------------------------------------------------------------------------------- /bin/log-rotate-alignak-backend: -------------------------------------------------------------------------------- 1 | "/var/log/alignak-backend/*.log" { 2 | copytruncate 3 | daily 4 | rotate 5 5 | compress 6 | delaycompress 7 | missingok 8 | notifempty 9 | } -------------------------------------------------------------------------------- /bin/log-rotate-uwsgi: -------------------------------------------------------------------------------- 1 | "/var/log/uwsgi/alignak-backend.log" { 2 | copytruncate 3 | daily 4 | rotate 5 5 | compress 6 | delaycompress 7 | missingok 8 | notifempty 9 | } 10 | -------------------------------------------------------------------------------- /bin/systemd/README: -------------------------------------------------------------------------------- 1 | # This directory contains systemd service units for different system installation: 2 | # - alignak-backend.service: 3 | # This is the default recommended installation with uWsgi and Python 3 plugin 4 | # 5 | # - alignak-backend.uwsgi2.service: 6 | # This is for an installation with uWsgi and Python 2 plugin 7 | # 8 | # - alignak-backend.uwsgi2.service: 9 | # This is for an installation with uWsgi and Python 2 plugin 10 | -------------------------------------------------------------------------------- /code_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors 4 | # 5 | # This file is part of Alignak. 6 | # 7 | # Alignak is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Alignak is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with Alignak. If not, see . 19 | 20 | echo 'pycodestyle ...' 21 | pycodestyle --max-line-length=100 --exclude='*.pyc, *.ini' --ignore='E402' alignak_backend/* 22 | if [ $? -ne 0 ]; then 23 | echo "pycodestyle not compliant" 24 | exit 25 | fi 26 | echo 'pylint ...' 27 | pylint --rcfile=.pylintrc alignak_backend/ 28 | if [ $? -ne 0 ]; then 29 | echo "pylint not compliant" 30 | exit 31 | fi 32 | echo 'pep157 ...' 33 | pep257 --select=D300 alignak_backend 34 | if [ $? -ne 0 ]; then 35 | echo "pep257 not compliant" 36 | exit 37 | fi 38 | echo 'tests ...' 39 | cd test 40 | pycodestyle --max-line-length=100 --exclude='*.pyc, *.cfg, *.log' --ignore='E402' test_*.py 41 | if [ $? -ne 0 ]; then 42 | echo "pycodestyle not compliant" 43 | exit 44 | fi 45 | pylint --rcfile=../.pylintrc test_*.py 46 | if [ $? -ne 0 ]; then 47 | echo "pylint not compliant" 48 | exit 49 | fi 50 | nosetests -xv --process-restartworker --processes=1 --process-timeout=300 test*.py 51 | cd .. 52 | -------------------------------------------------------------------------------- /docs/_static/actionacknowledge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/actionacknowledge.png -------------------------------------------------------------------------------- /docs/_static/actiondowntime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/actiondowntime.png -------------------------------------------------------------------------------- /docs/_static/actionforcecheck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/actionforcecheck.png -------------------------------------------------------------------------------- /docs/_static/alignakretention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/alignakretention.png -------------------------------------------------------------------------------- /docs/_static/architecture_schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/architecture_schema.png -------------------------------------------------------------------------------- /docs/_static/configalignak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/configalignak.png -------------------------------------------------------------------------------- /docs/_static/configalignak_notifications.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/configalignak_notifications.png -------------------------------------------------------------------------------- /docs/_static/configcommand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/configcommand.png -------------------------------------------------------------------------------- /docs/_static/confighost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/confighost.png -------------------------------------------------------------------------------- /docs/_static/confighostdependency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/confighostdependency.png -------------------------------------------------------------------------------- /docs/_static/confighostescalation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/confighostescalation.png -------------------------------------------------------------------------------- /docs/_static/confighostgroup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/confighostgroup.png -------------------------------------------------------------------------------- /docs/_static/configrealm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/configrealm.png -------------------------------------------------------------------------------- /docs/_static/configservice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/configservice.png -------------------------------------------------------------------------------- /docs/_static/configservicedependency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/configservicedependency.png -------------------------------------------------------------------------------- /docs/_static/configserviceescalation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/configserviceescalation.png -------------------------------------------------------------------------------- /docs/_static/configservicegroup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/configservicegroup.png -------------------------------------------------------------------------------- /docs/_static/configtimeperiod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/configtimeperiod.png -------------------------------------------------------------------------------- /docs/_static/configuser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/configuser.png -------------------------------------------------------------------------------- /docs/_static/configusergroup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/configusergroup.png -------------------------------------------------------------------------------- /docs/_static/css/mystyle.css: -------------------------------------------------------------------------------- 1 | @import "theme.css"; 2 | 3 | /* 4 | This to make the table first column do not have any margin when two lines exist 5 | */ 6 | table.docutils div.line-block { 7 | margin-left: 0; 8 | } 9 | 10 | .wy-nav-content { 11 | max-width: none; 12 | } 13 | -------------------------------------------------------------------------------- /docs/_static/log_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/log_history.png -------------------------------------------------------------------------------- /docs/_static/log_logcheckresult.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/log_logcheckresult.png -------------------------------------------------------------------------------- /docs/_static/ls_alignakdaemon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/ls_alignakdaemon.png -------------------------------------------------------------------------------- /docs/_static/ls_livesynthesis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/ls_livesynthesis.png -------------------------------------------------------------------------------- /docs/_static/ls_livesynthesisretention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/ls_livesynthesisretention.png -------------------------------------------------------------------------------- /docs/_static/retentionhost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/retentionhost.png -------------------------------------------------------------------------------- /docs/_static/retentionservice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/retentionservice.png -------------------------------------------------------------------------------- /docs/_static/ts_grafana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/ts_grafana.png -------------------------------------------------------------------------------- /docs/_static/ts_graphite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/ts_graphite.png -------------------------------------------------------------------------------- /docs/_static/ts_influxdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/ts_influxdb.png -------------------------------------------------------------------------------- /docs/_static/ts_statsd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/ts_statsd.png -------------------------------------------------------------------------------- /docs/_static/ts_timeseriesretention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/ts_timeseriesretention.png -------------------------------------------------------------------------------- /docs/_static/userrestrictrole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/docs/_static/userrestrictrole.png -------------------------------------------------------------------------------- /docs/architecture.rst: -------------------------------------------------------------------------------- 1 | .. _architecture: 2 | 3 | Architecture 4 | ============ 5 | 6 | This is the architecture schema about the backend behaviors: 7 | 8 | .. image:: _static/architecture_schema.png 9 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. Alignak Backend documentation master file, created by 2 | sphinx-quickstart on Tue Aug 25 14:10:34 2015. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Alignak Backend's documentation 7 | =============================== 8 | 9 | Project version: 10 | ---------------- 11 | 12 | Main version: |version|, release: |release| 13 | 14 | Documentation content: 15 | ---------------------- 16 | 17 | .. toctree:: 18 | :maxdepth: 2 19 | 20 | Main Alignak documentation 21 | intro 22 | architecture 23 | install 24 | configuration 25 | run 26 | features 27 | resources 28 | api 29 | tutorial 30 | 31 | Indices and tables 32 | ================== 33 | 34 | * :ref:`genindex` 35 | * :ref:`modindex` 36 | * :ref:`search` 37 | 38 | -------------------------------------------------------------------------------- /docs/intro.rst: -------------------------------------------------------------------------------- 1 | .. _intro: 2 | 3 | Introduction 4 | ============ 5 | 6 | This project is a Alignak Backend. 7 | It is used to: 8 | 9 | * manage configuration (hosts, services, contacts, timeperiods...) 10 | 11 | * end user (webui, command line...) can get and add configurations elements 12 | * Alignak gets its configuration from the backend when the arbiter module is starting 13 | * user rights management 14 | * template management for host and services 15 | 16 | * manage retention 17 | 18 | * Alignak loads and saves retention information in the backend for checks/hosts/services 19 | 20 | * manage live states 21 | 22 | * Alignak adds/updates hosts and services states in the backend 23 | * end user (webui, command line...) can get this information 24 | 25 | * timeseries for perfdata 26 | 27 | * send perfdata to graphite/carbon 28 | * send perfdata to influxdb 29 | 30 | * actions in Alignak 31 | 32 | * Add/remove acknowledge 33 | * add/remove downtime 34 | * reforce a check -------------------------------------------------------------------------------- /docs/resources.rst: -------------------------------------------------------------------------------- 1 | .. _resources: 2 | 3 | Backend data model and resources 4 | ================================ 5 | 6 | The Alignak backend manages resources that are of several types: 7 | 8 | 9 | Monitored system configuration 10 | ------------------------------ 11 | 12 | Resources used for configuration: 13 | 14 | .. toctree:: 15 | :maxdepth: 2 16 | :glob: 17 | 18 | resources/config* 19 | 20 | Action 21 | ------ 22 | 23 | Resources for actions: 24 | 25 | .. toctree:: 26 | :maxdepth: 2 27 | :glob: 28 | 29 | resources/action* 30 | 31 | 32 | Live state 33 | ---------- 34 | 35 | System live state resources: 36 | 37 | .. toctree:: 38 | :maxdepth: 2 39 | :glob: 40 | 41 | resources/ls_* 42 | 43 | 44 | Timeseries 45 | ---------- 46 | 47 | Time series resources: 48 | 49 | .. toctree:: 50 | :maxdepth: 2 51 | :glob: 52 | 53 | resources/ts_* 54 | 55 | 56 | Retention 57 | --------- 58 | 59 | Retentions resources: 60 | 61 | .. toctree:: 62 | :maxdepth: 2 63 | :glob: 64 | 65 | resources/alignakretention 66 | 67 | Log 68 | --- 69 | 70 | Log resources: 71 | 72 | .. toctree:: 73 | :maxdepth: 2 74 | :glob: 75 | 76 | resources/log_* 77 | 78 | 79 | Users rights 80 | ------------ 81 | 82 | Users resources: 83 | 84 | .. toctree:: 85 | :maxdepth: 2 86 | :glob: 87 | 88 | resources/userrestrictrole 89 | 90 | -------------------------------------------------------------------------------- /docs/resources/alignakretention.rst: -------------------------------------------------------------------------------- 1 | .. _resource-alignakretention: 2 | 3 | Host/service data retention from scheduler of Alignak (alignakretention) 4 | ======================================================================== 5 | 6 | 7 | The ``alignakretention`` model is used by the Alignak backend scheduler module for the 8 | Alignak retention feature. 9 | 10 | 11 | .. image:: ../_static/alignakretention.png 12 | 13 | 14 | .. csv-table:: Properties 15 | :header: "Property", "Type", "Required", "Default", "Relation" 16 | 17 | "| _user", "objectid", "", "", ":ref:`user `" 18 | "| host", "string", "", "", "" 19 | "| schema_version", "integer", "", "1", "" 20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/resources/config_alignak_notifications.rst: -------------------------------------------------------------------------------- 1 | .. _resource-alignak_notifications: 2 | 3 | Alignak notifications (alignak_notifications) 4 | ============================================= 5 | 6 | 7 | The ``alignak_notifications`` model is a cache used internally by the backend to store the 8 | notifications that must be sent out to the Alignak arbiter. 9 | 10 | 11 | .. image:: ../_static/config_alignak_notifications.png 12 | 13 | 14 | .. csv-table:: Properties 15 | :header: "Property", "Type", "Required", "Default", "Relation" 16 | 17 | "| event 18 | | *Notification event (creation, deletion,...)*", "**string**", "**True**", "****", "" 19 | "| notification 20 | | *Notification url*", "string", "", "backend_notification", "" 21 | "| parameters 22 | | *Notification parameters*", "string", "", "", "" 23 | "| schema_version", "integer", "", "1", "" 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/resources/ts_statsd.rst: -------------------------------------------------------------------------------- 1 | .. _resource-statsd: 2 | 3 | StatsD connection (statsd) 4 | ========================== 5 | 6 | 7 | The ``statsd`` model contains information to provide the monitored system performance 8 | data to StatsD. 9 | 10 | The Alignak backend will use those information to connect to a StatsD daemon and send the 11 | timeseries data. StatsD may be used as a front-end to Graphite or InfluxDB thus an 12 | instance of this data model may be related to a Graphite or InfluxDB instance. 13 | 14 | 15 | .. image:: ../_static/ts_statsd.png 16 | 17 | 18 | .. csv-table:: Properties 19 | :header: "Property", "Type", "Required", "Default", "Relation" 20 | 21 | "| :ref:`_realm ` 22 | | *Realm*", "**objectid**", "**True**", "****", ":ref:`realm `" 23 | "| :ref:`_sub_realm ` 24 | | *Sub-realms*", "boolean", "", "True", "" 25 | "| _users_delete", "objectid list", "", "", ":ref:`user `" 26 | "| _users_read", "objectid list", "", "", ":ref:`user `" 27 | "| _users_update", "objectid list", "", "", ":ref:`user `" 28 | "| address 29 | | *Server address*", "**string**", "**True**", "****", "" 30 | "| :ref:`name ` 31 | | *StatsD connection name*", "**string**", "**True**", "****", "" 32 | "| port 33 | | *Server port*", "integer", "", "8125", "" 34 | "| :ref:`prefix ` 35 | | *Metrics prefix*", "string", "", "", "" 36 | "| schema_version", "integer", "", "1", "" 37 | .. _statsd-_realm: 38 | 39 | ``_realm``: Realm this element belongs to. 40 | 41 | .. _statsd-_sub_realm: 42 | 43 | ``_sub_realm``: Is this element visible in the sub-realms of its realm? 44 | 45 | .. _statsd-name: 46 | 47 | ``name``: Unique StatsD connection name 48 | 49 | .. _statsd-prefix: 50 | 51 | ``prefix``: Prefix that is configured in the StatsD server (if any). 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /docs/resources/ts_timeseriesretention.rst: -------------------------------------------------------------------------------- 1 | .. _resource-timeseriesretention: 2 | 3 | TS cache (timeseriesretention) 4 | ============================== 5 | 6 | 7 | The ``timeseriesretention`` model is a cache used internally by the backend to store the 8 | data that could not be sent to Graphite / Influx DB because of a temporarily missing 9 | connection. 10 | 11 | 12 | .. image:: ../_static/ts_timeseriesretention.png 13 | 14 | 15 | .. csv-table:: Properties 16 | :header: "Property", "Type", "Required", "Default", "Relation" 17 | 18 | "| graphite 19 | | *Graphite relation*", "objectid", "", "None", ":ref:`graphite `" 20 | "| host 21 | | *Stored metric host*", "**string**", "**True**", "****", "" 22 | "| influxdb 23 | | *InfluxDB relation*", "objectid", "", "None", ":ref:`influxdb `" 24 | "| name 25 | | *Stored metric name*", "**string**", "**True**", "****", "" 26 | "| realm 27 | | *Stored metric host/service realm*", "**string**", "**True**", "****", "" 28 | "| schema_version", "integer", "", "1", "" 29 | "| service 30 | | *Stored metric service*", "**string**", "**True**", "****", "" 31 | "| timestamp 32 | | *Stored metric timestamp*", "**integer**", "**True**", "****", "" 33 | "| uom 34 | | *Stored metric unit of measure*", "**string**", "**True**", "****", "" 35 | "| value 36 | | *Stored metric value*", "**string**", "**True**", "****", "" 37 | 38 | 39 | -------------------------------------------------------------------------------- /etc/alignak-backend-logger.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "disable_existing_loggers": false, 4 | "formatters": { 5 | "alignak_backend_extra": { 6 | "format": "[%(asctime)s] %(levelname)s: [%(name)s] %(clientip)s -- %(method)s -- %(url)s -- %(message)s", 7 | "datefmt": "%Y-%m-%d %H:%M:%S" 8 | }, 9 | "alignak_backend": { 10 | "format": "[%(asctime)s] %(levelname)s: [%(name)s] %(message)s", 11 | "datefmt": "%Y-%m-%d %H:%M:%S" 12 | } 13 | }, 14 | 15 | "handlers": { 16 | "console": { 17 | "class": "logging.StreamHandler", 18 | "level": "DEBUG", 19 | "formatter": "alignak_backend", 20 | "stream": "ext://sys.stdout" 21 | }, 22 | "alignak_backend": { 23 | "class": "logging.handlers.TimedRotatingFileHandler", 24 | "level": "DEBUG", 25 | "formatter": "alignak_backend", 26 | "filename": "%(logdir)s/%(daemon)s.log", 27 | "when": "midnight", 28 | "interval": 1, 29 | "backupCount": 7, 30 | "encoding": "utf8" 31 | } 32 | }, 33 | 34 | "loggers": { 35 | "eve": { 36 | "level": "INFO", 37 | "handlers": ["alignak_backend"], 38 | "propagate": "no" 39 | }, 40 | "apscheduler.executors.default": { 41 | "level": "ERROR", 42 | "handlers": ["alignak_backend"], 43 | "propagate": "no" 44 | } 45 | }, 46 | 47 | "root": { 48 | "level": "ERROR", 49 | "handlers": [] 50 | } 51 | } -------------------------------------------------------------------------------- /etc/alignak-backend.wsgi: -------------------------------------------------------------------------------- 1 | # Uncomment and update to force a specific Python interpreter 2 | # Else, let use the default system Python interpreter 3 | # import sys 4 | # sys.path.append('/usr/local/lib/python2.7/site-packages/alignak_backend') 5 | 6 | from alignak_backend.app import app as application 7 | -------------------------------------------------------------------------------- /etc/grafana_queries.json: -------------------------------------------------------------------------------- 1 | { 2 | "Hosts problems": { 3 | "endpoint": "host", 4 | "query": { 5 | "_overall_state_id": {"$gt": 2}, "_is_template": false 6 | } 7 | }, 8 | "Hosts up": { 9 | "endpoint": "host", 10 | "query": { 11 | "ls_state_id": 0, "_is_template": false 12 | } 13 | } 14 | ,"Hosts down": { 15 | "endpoint": "host", 16 | "query": { 17 | "ls_state_id": {"$in": [1, 2]}, "_is_template": false 18 | } 19 | } 20 | ,"Hosts unreachable": { 21 | "endpoint": "host", 22 | "query": { 23 | "ls_state_id": {"$gt": 2}, "_is_template": false 24 | } 25 | }, 26 | "Services problems": { 27 | "endpoint": "service", 28 | "query": { 29 | "_overall_state_id": {"$gt": 2}, "_is_template": false 30 | } 31 | }, 32 | "Services ok": { 33 | "endpoint": "service", 34 | "query": { 35 | "ls_state_id": 0, "_is_template": false 36 | } 37 | }, 38 | "Services warning": { 39 | "endpoint": "service", 40 | "query": { 41 | "ls_state_id": 1, "_is_template": false 42 | } 43 | }, 44 | "Services critical": { 45 | "endpoint": "service", 46 | "query": { 47 | "ls_state_id": 2, "_is_template": false 48 | } 49 | }, 50 | "Services unreachable": { 51 | "endpoint": "service", 52 | "query": { 53 | "ls_state_id": { 54 | "$gt": 2 55 | }, 56 | "_is_template": false 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /etc/grafana_tables.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": [ 3 | "name", "alias", "business_impact", "tags", 4 | "active_checks_enabled", "passive_checks_enabled", 5 | "_overall_state_id", 6 | "ls_state", "ls_state_id", "ls_state_type", "ls_last_check", 7 | "ls_acknowledged", "ls_downtimed", 8 | "ls_grafana_panelid" 9 | ], 10 | "service": [ 11 | "host", 12 | "name", "alias", "business_impact", "tags", 13 | "active_checks_enabled", "passive_checks_enabled", 14 | "_overall_state_id", 15 | "ls_state", "ls_state_id", "ls_state_type", "ls_last_check", 16 | "ls_acknowledged", "ls_downtimed", 17 | "ls_grafana_panelid" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /etc/uwsgi-service.ini: -------------------------------------------------------------------------------- 1 | # When the backend is started with uWsgi as a system service, this file will be loaded by the uwsgi 2 | # run from the system unit. 3 | # The main uWsgi parameters are defined on the command line and this file authorizes to define 4 | # the loaded Python app and some extra parameters 5 | # Note: The parameters defined in this file will overload the one defined in the service unit 6 | [uwsgi] 7 | # Python module 8 | module = alignak_backend.app:app 9 | 10 | # Report memory activity to the stats 11 | memory-report = true 12 | 13 | # Default buffer size for HTTP header is very low (4096) 14 | buffer-size = 32768 15 | 16 | # --- 17 | # Statistics part 18 | # Uncomment this line to activate statistics sending to carbon/graphite 19 | # carbon = 127.0.0.1:2003 20 | # defaults to uwsgi 21 | carbon-root = alignak-backend 22 | # replace dots in hostnames 23 | carbon-hostname-dots = - 24 | -------------------------------------------------------------------------------- /etc/uwsgi.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | http-socket = 0.0.0.0:5000 3 | 4 | # Comment if you installed from PyPI 5 | plugin = python 6 | # Comment if you installed from PyPI 7 | plugin = logfile 8 | 9 | # Python module 10 | module = alignak_backend.app:app 11 | 12 | enable-threads = true 13 | processes = 4 14 | 15 | # Log requests activity (disable by default because too verbose) 16 | # req-logger = file:/usr/local/var/log/alignak-backend/backend-access.log 17 | # Log information, errors... 18 | logger = file:/usr/local/var/log/alignak-backend/backend-error.log 19 | 20 | # Report memory activity to the stats 21 | memory-report = true 22 | 23 | # Define specific uid/gid if uWSGI started as root 24 | uid = alignak 25 | guid = alignak 26 | 27 | # Default buffer size for HTTP header is very low (4096) 28 | buffer-size = 32768 29 | 30 | # uWSGI master process: use a master process and store its pid 31 | master = true 32 | pidfile = /tmp/alignak-backend.pid 33 | 34 | # --- 35 | # Statistics part 36 | # Uncomment this line to activate statistics sending to carbon/graphite 37 | # carbon = 127.0.0.1:2003 38 | # defaults to uwsgi 39 | carbon-root = alignak-backend 40 | # replace dots in hostnames 41 | carbon-hostname-dots = - 42 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # Too general libraries to specify a version 2 | future 3 | docopt 4 | 5 | jsonschema==2.6.0 6 | jsmin==2.2.2 7 | configparser==3.5.0 8 | 9 | influxdb==5.1.0 10 | statsd==3.2.2 11 | 12 | # Set Eve as 0.7.9 because >=0.8.0 is not yet compatible 13 | Eve==0.7.9 14 | Eve-Swagger==0.0.11 15 | 16 | # Flask extensions 17 | Flask<=0.12,>=0.10.1 18 | Flask-Pymongo<2.0.0 19 | flask-bootstrap==3.3.7.1 20 | flask-apscheduler==1.8.0 21 | 22 | # uWSGI server - a recommended Web server to run the application in a production environment 23 | # uncomment this to install from the Python repository if not installed by the server packaging 24 | # uwsgi==0.2.17 25 | -------------------------------------------------------------------------------- /test/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | omit = 3 | ./test* 4 | ./alignak_backend/carboniface.py 5 | 6 | [report] 7 | omit = 8 | */python?.?/* 9 | */site-packages/nose/* 10 | /usr/share/pyshared/* 11 | ./test* 12 | -------------------------------------------------------------------------------- /test/alignak_cfg_files/contact_admin.cfg: -------------------------------------------------------------------------------- 1 | define contact{ 2 | contact_name admin-test 3 | email alignak@localhost 4 | pager 0600000000 ; contact phone number 5 | password admin 6 | is_admin 1 7 | expert 1 8 | host_notifications_enabled 1 9 | service_notifications_enabled 1 10 | email shinken@localhost 11 | can_submit_commands 1 12 | service_notification_period 24x7 13 | host_notification_period 24x7 14 | service_notification_commands notify-service-by-email ; send service notifications via email 15 | host_notification_commands notify-host-by-email ; send host notifications via email 16 | } 17 | 18 | 19 | ## Notify Host by Email 20 | define command { 21 | command_name notify-host-by-email 22 | command_line $PLUGINSDIR$/notify_by_email.py -n host -S localhost -r $CONTACTEMAIL$ -f html -c "$NOTIFICATIONTYPE$,,$HOSTNAME$,,$HOSTADDRESS$,,$LONGDATETIME$" -o "$HOSTALIAS$,,$HOSTSTATE$,,$HOSTDURATION$" 23 | } 24 | 25 | 26 | ## Notify Service by Email 27 | define command { 28 | command_name notify-service-by-email 29 | command_line $PLUGINSDIR$/notify_by_email.py -n service -S localhost -r $CONTACTEMAIL$ -f html -c "$NOTIFICATIONTYPE$,,$HOSTNAME$,,$HOSTADDRESS$,,$LONGDATETIME$" -o "$SERVICEDESC$,,$SERVICESTATE$,,$SERVICEOUTPUT$,,$SERVICEDURATION$" 30 | } 31 | 32 | define timeperiod{ 33 | timeperiod_name 24x7 34 | alias Always 35 | sunday 00:00-24:00 36 | monday 00:00-24:00 37 | tuesday 00:00-24:00 38 | wednesday 00:00-24:00 39 | thursday 00:00-24:00 40 | friday 00:00-24:00 41 | saturday 00:00-24:00 42 | } 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /test/alignak_cfg_files/hosts.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | name template01 3 | check_interval 2 4 | register 0 5 | } 6 | 7 | define host{ 8 | name template02 9 | check_interval 4 10 | max_check_attempts 6 11 | register 0 12 | } 13 | 14 | define host{ 15 | use template01, template02 16 | host_name srv01 17 | address 192.168.1.10 18 | check_command check_tcp!3306!5!8 19 | } 20 | 21 | define command{ 22 | command_name check_tcp 23 | command_line $PLUGINSDIR$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ -w $ARG2$ -c $ARG3$ 24 | } -------------------------------------------------------------------------------- /test/alignak_cfg_files/hosts2.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | name template01 3 | check_interval 4 4 | max_check_attempts 6 5 | register 0 6 | } 7 | 8 | define host{ 9 | use template01 10 | host_name srv01 11 | address 192.168.1.10 12 | check_command check_tcp 13 | } 14 | 15 | define command{ 16 | command_name check_tcp 17 | command_line $PLUGINSDIR$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ 18 | } -------------------------------------------------------------------------------- /test/alignak_cfg_files/hosts_custom_variables.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | name template01 3 | check_interval 4 4 | max_check_attempts 6 5 | register 0 6 | } 7 | 8 | define host{ 9 | use template01 10 | host_name srv01 11 | address 192.168.1.10 12 | check_command check_tcp 13 | _GPS_LOC 45 14 | } 15 | 16 | define command{ 17 | command_name check_tcp 18 | command_line $PLUGINSDIR$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ 19 | } -------------------------------------------------------------------------------- /test/alignak_cfg_files/hosts_links_hostgroup.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | name generic-host 3 | check_command check_host_alive 4 | max_check_attempts 2 5 | check_interval 5 6 | active_checks_enabled 1 7 | check_period 24x7 8 | notification_interval 1440 9 | notification_period 24x7 10 | notification_options d,u,r,f 11 | notifications_enabled 1 12 | event_handler_enabled 0 13 | flap_detection_enabled 1 14 | process_perf_data 1 15 | register 0 16 | } 17 | 18 | define host{ 19 | use generic-host 20 | host_name webui 21 | address 192.160.20.1 22 | alias Alignak on FreeBSD 23 | display_name Fred's testing server 24 | business_impact 4 25 | hostgroups freebsd, alignak 26 | } 27 | 28 | define hostgroup{ 29 | hostgroup_name freebsd ; The name of the hostgroup 30 | alias FreeBSD Servers ; Long name of the group 31 | } 32 | 33 | define hostgroup{ 34 | hostgroup_name alignak ; The name of the hostgroup 35 | alias alignak Servers ; Long name of the group 36 | } 37 | 38 | define timeperiod{ 39 | timeperiod_name 24x7 40 | } 41 | 42 | define command{ 43 | command_name check_host_alive 44 | command_line $PLUGINSDIR$/check_ping -H $HOSTADDRESS$ 45 | } -------------------------------------------------------------------------------- /test/alignak_cfg_files/hosts_links_parent.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | name generic-host 3 | check_command check_host_alive 4 | max_check_attempts 2 5 | check_interval 5 6 | active_checks_enabled 1 7 | check_period 24x7 8 | notification_interval 1440 9 | notification_period 24x7 10 | notification_options d,u,r,f 11 | notifications_enabled 1 12 | event_handler_enabled 0 13 | flap_detection_enabled 1 14 | process_perf_data 1 15 | register 0 16 | } 17 | 18 | define host{ 19 | use generic-host 20 | host_name webui 21 | address 192.160.20.1 22 | alias Alignak on FreeBSD 23 | display_name Fred's testing server 24 | business_impact 4 25 | parents backend, mongo 26 | } 27 | 28 | define host{ 29 | use generic-host 30 | host_name backend 31 | address 192.168.20.2 32 | alias Alignak on FreeBSD 33 | display_name David's testing server 34 | business_impact 4 35 | } 36 | 37 | define host{ 38 | use generic-host 39 | host_name mongo 40 | address 192.168.20.3 41 | alias Mongodb on FreeBSD 42 | display_name David's testing server 43 | business_impact 5 44 | } 45 | 46 | define timeperiod{ 47 | timeperiod_name 24x7 48 | } 49 | 50 | define command{ 51 | command_name check_host_alive 52 | command_line $PLUGINSDIR$/check_ping -H $HOSTADDRESS$ 53 | } -------------------------------------------------------------------------------- /test/alignak_cfg_files/timeperiods.cfg: -------------------------------------------------------------------------------- 1 | # 'workhours' timeperiod definition 2 | define timeperiod{ 3 | timeperiod_name workhours 4 | alias Normal Work Hours 5 | monday 09:00-17:00 6 | tuesday 09:00-17:00 7 | wednesday 09:00-17:00 8 | thursday 09:00-17:00 9 | friday 09:00-12:00,14:00-16:00 10 | } 11 | -------------------------------------------------------------------------------- /test/alignak_cfg_files/timeperiods_complex.cfg: -------------------------------------------------------------------------------- 1 | # 'workhours' timeperiod definition 2 | define timeperiod{ 3 | timeperiod_name workhours 4 | alias Normal Work Hours 5 | monday 09:00-17:00 6 | tuesday 09:00-17:00 7 | wednesday 09:00-17:00 8 | thursday 09:00-17:00 9 | friday 09:00-12:00,14:00-16:00 10 | exclude us-holidays 11 | } 12 | 13 | define timeperiod{ 14 | name us-holidays 15 | timeperiod_name us-holidays 16 | alias U.S. Holidays 17 | 18 | january 1 00:00-00:00 ; New Years 19 | july 4 00:00-00:00 ; Independence Day 20 | monday 1 september 00:00-00:00 ; Labor Day (first Monday in September) 21 | thursday -1 november 00:00-00:00 ; Thanksgiving (last Thursday in November) 22 | december 25 00:00-00:00 ; Christmas 23 | } -------------------------------------------------------------------------------- /test/alignakbackend.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | from alignak_backend.app import app 3 | -------------------------------------------------------------------------------- /test/cfg/command_http.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "http", 3 | "command_line": "check_http -H $HOSTADDRESS$" 4 | } 5 | -------------------------------------------------------------------------------- /test/cfg/command_https.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "https", 3 | "command_line": "check_http -H $HOSTADDRESS$ -S" 4 | } 5 | -------------------------------------------------------------------------------- /test/cfg/command_notification_host.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "notify-host-by-email-html", 3 | "command_line": "$PLUGINSDIR$/notify_by_email.py -t host -S $SMTP_SERVER$ -ST $SMTP_PORT$ -SL $SMTP_LOGIN$ -SP $SMTP_PASSWORD$ -fh -to $CONTACTEMAIL$ -fr $MAIL_FROM$ -nt $NOTIFICATIONTYPE$ -hn \"$HOSTNAME$\" -ha $HOSTADDRESS$ -s $HOSTSTATE$ -ls $LASTHOSTSTATE$ -o \"$HOSTOUTPUT$\" -dt $HOSTDURATIONSEC$ -db \"$LASTHOSTSTATECHANGE$\" -i $HOSTBUSINESSIMPACT$ -p \"$HOSTPERFDATA$\"" 4 | } 5 | -------------------------------------------------------------------------------- /test/cfg/command_notification_service.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "notify-service-by-email-html", 3 | "command_line": "$PLUGINSDIR$/notify_by_email.py -t service -S $SMTP_SERVER$ -ST $SMTP_PORT$ -SL $SMTP_LOGIN$ -SP $SMTP_PASSWORD$ -fh -to $CONTACTEMAIL$ -fr $MAIL_FROM$ -nt $NOTIFICATIONTYPE$ -hn \"$HOSTNAME$\" -ha $HOSTADDRESS$ -sn \"$SERVICEDESC$\" -s $SERVICESTATE$ -ls $LASTSERVICESTATE$ -o \"$SERVICEOUTPUT$\" -dt $SERVICEDURATIONSEC$ -db \"$LASTSERVICESTATECHANGE$\" -i $SERVICEBUSINESSIMPACT$ -p \"$SERVICEPERFDATA$\"" 4 | } 5 | -------------------------------------------------------------------------------- /test/cfg/command_ping.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ping", 3 | "command_line": "check_ping -H $HOSTADDRESS$" 4 | } 5 | -------------------------------------------------------------------------------- /test/cfg/command_ssh.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ssh", 3 | "command_line": "check_ssh $HOSTADDRESS$" 4 | } 5 | -------------------------------------------------------------------------------- /test/cfg/default/certs/README: -------------------------------------------------------------------------------- 1 | # Do not use this KPI/Certs in production. they are only here for easy demo and ssl test in your testing env. 2 | # NOT IN YOUR PRODUCTION, NEVER! 3 | 4 | To generate a new: 5 | openssl req -new -nodes -out server-req.pem -keyout private/server-key.pem -config /etc/ssl/openssl.cnf 6 | openssl ca -config openssl.conf -out server-cert.pem -infiles server-req.pem 7 | 8 | -------------------------------------------------------------------------------- /test/cfg/default/certs/ca.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDXTCCAkWgAwIBAgIJAI/9B7Y2NvOHMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV 3 | BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX 4 | aWRnaXRzIFB0eSBMdGQwHhcNMTUwNTA0MTIyMzQ1WhcNMjUwNTAxMTIyMzQ1WjBF 5 | MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50 6 | ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB 7 | CgKCAQEA4+793mz2V53vkBEQZxlneayCW0B7VlWUvv1JUxh3bJTfDk7OBaNYQdtj 8 | k8Xp+EvdpBztvest/qYbEAMr9yzwWlt0w/dcQzQyL+kNAGxG8giYPDctim4Pi1Nm 9 | EsU580k65N+ZsFhuUHdyWqjkUwfI07rzSYyOCVb6Dfb/sWCi+9U7AC94Q+oGnJpJ 10 | u1rf8notMQ32XRFDAUdOCh8Xnxmd+drOm5qOCItr521nJb1V+/Ax/O1dFKuthVxa 11 | ktdUquQvAEJDJWl/KUx/4l2yBjQGn2/Vw0Yad+DK5ftuFIT1eFd+vlAbA6y/We0D 12 | RwZ0txzD16MTgFy0pfyGXoSPFoR1/wIDAQABo1AwTjAdBgNVHQ4EFgQUzh6J6dRA 13 | vmOCAMklV63VyES0XkAwHwYDVR0jBBgwFoAUzh6J6dRAvmOCAMklV63VyES0XkAw 14 | DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEATbN6sFSrUVUFeksIYdZU 15 | C2kejckpOIorp+dc1IW4+VTYjPc4xK06/iZpWtYMdU8V5v5F8YHZcW2AlPFsR08c 16 | ZmJ1ex4YPkjsL5GIg7VVig5SK4PKAhQy4DqF6GydhNKSw9EnUn2Tww8E4GxH6lmO 17 | s2rGjAgS1gpcH+wsSqMlmSlyspwV1Vcspy0w/rJz870lZMAzArpbp2ODdY0+w4av 18 | FuPSr+KjNQziivlZONVtWLWk/iiXdSq92hASoyTJ8eLtikIWhwAZbPjJ8HKv3QjD 19 | QE2ihH5AFxJGNYBoJSUOSjOmqwQMUFyylX6gl1eUuAxm7b4W3Ps0rriDsYR0fxio 20 | rw== 21 | -----END CERTIFICATE----- 22 | -------------------------------------------------------------------------------- /test/cfg/default/certs/index.txt: -------------------------------------------------------------------------------- 1 | V 250501122831Z 1000 unknown /C=AU/ST=Some-State/O=Internet Widgits Pty Ltd/CN=* 2 | -------------------------------------------------------------------------------- /test/cfg/default/certs/index.txt.attr: -------------------------------------------------------------------------------- 1 | unique_subject = yes 2 | -------------------------------------------------------------------------------- /test/cfg/default/certs/index.txt.old: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/test/cfg/default/certs/index.txt.old -------------------------------------------------------------------------------- /test/cfg/default/certs/serial: -------------------------------------------------------------------------------- 1 | 1001 2 | -------------------------------------------------------------------------------- /test/cfg/default/certs/serial.old: -------------------------------------------------------------------------------- 1 | 1000 2 | -------------------------------------------------------------------------------- /test/cfg/default/certs/server-req.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICljCCAX4CAQAwUTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUx 3 | ITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEKMAgGA1UEAwwBKjCC 4 | ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAORmyj2BbwABx3nlRwrj9yQH 5 | SdMok/GOSBBMxm/Jsy1orQq0D7L2u1FqxcvOPHS3n4pkDVNySnuRlQmf90GAK5+J 6 | CZl19l/VK/d2iV04UOXvV5YWAyWuCoHUhOX+9maR6ezD+sASbyV4cO9/99vJcSgp 7 | YnJ0vZlBrztc+KBIEyw7xG2fKwewSrv7/nG6wj5RXc+ezEW8zRImg02ef8PpV8lr 8 | Kl4aq3RkgA1ovClt0nA0lR9a4FxNHzsdxoJs29LE2Jd/5b6xsKadFqzG9YrL6gHT 9 | lLoFOhFQkxKgyRJnl1Mx2i+DbBRzieUR45R/IwfuXaTGTn1S3Z+m3IDiSyBtipsC 10 | AwEAAaAAMA0GCSqGSIb3DQEBBQUAA4IBAQAckEbSbSrpZtMBXOHyds0r92/f6Jig 11 | kpaxUMiEGDnwgCU0YaI8wBsmftU3hfYy6MwEOBew8J437K1ESphA7jagxQ3GVNom 12 | kaq2M1t724h22bwqNDQOv9CYoVF854kuONvaiYwlo/wCLiKXy6BvY0hfGOePp2oR 13 | fzzTSh9Ex0PaFbuMK/hCGythgrRN1hDDbK9i3sdwIc+eJyokMv9BgV0CUFs0mu2y 14 | u7xEib/5RUgEABzCxuRCiPwxQ+PdVUtmLsgGhfB5POHjPNJCDmKIouWYI/n+XGB/ 15 | mQHGU+RKvw/N1sZQHg9kXGK5VarpxaTWkx3aCpdVAXI8eOd/HTQIvLU6 16 | -----END CERTIFICATE REQUEST----- 17 | -------------------------------------------------------------------------------- /test/cfg/default/certs/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDkZso9gW8AAcd5 3 | 5UcK4/ckB0nTKJPxjkgQTMZvybMtaK0KtA+y9rtRasXLzjx0t5+KZA1Tckp7kZUJ 4 | n/dBgCufiQmZdfZf1Sv3doldOFDl71eWFgMlrgqB1ITl/vZmkensw/rAEm8leHDv 5 | f/fbyXEoKWJydL2ZQa87XPigSBMsO8RtnysHsEq7+/5xusI+UV3PnsxFvM0SJoNN 6 | nn/D6VfJaypeGqt0ZIANaLwpbdJwNJUfWuBcTR87HcaCbNvSxNiXf+W+sbCmnRas 7 | xvWKy+oB05S6BToRUJMSoMkSZ5dTMdovg2wUc4nlEeOUfyMH7l2kxk59Ut2fptyA 8 | 4ksgbYqbAgMBAAECggEBAM90ygeZtD/WXeBLL/8lVwqjkBu7BL3olW4wviE1nIkH 9 | Rf2t1YCheT0XdXeL6P++9auW+z+rVRnt/uhSIxyclYL/zvdT3SfokVnhkh1ZFKn1 10 | fqG1dsBX1/VbGidqMVay/D3xOKYTWF85iaMQogpBa4WmKWR6wugccFTEOpQjQz7t 11 | hqUbWrjkLJlZuWHtxDOZNjNFt6Bz7kWpcH4y6+M5NbHhluagKjDGANkAWcWBhYdf 12 | prNK6LDXP9WOeT308Tx5fhKX3vWERFaguiOpZwOZoeAJ3I+k45jsnBs6zeupDtDx 13 | D3wr3l72zk4U8Hf/mFj8DAMhgH1ALMLb0JeiyAQrmmECgYEA/7S1dyWgH7FEm89U 14 | kCpWU4q4zm0KvSxtQFjlh2Bj0DCeFG/OBrAeHE8GBWS0WoLAfAUSdrrIOm8UM8Bg 15 | 3jMl3QSZTjJLuRPfAj/909jaT4F8x04+pDw2mzLBY1O8AOj9wx/WzvVnDii+3pRy 16 | wBa9VVkMaL/I0ALo3WQ5EuVZIesCgYEA5KoKogNc58dYtrUrqPYf0cdxSrFO/Jxu 17 | KPga9VfkdxCqVW2G85eUC/BeydrhN+5lAc1ro38FLCpyTBxWJQTtKRCcZoZKYBCJ 18 | xeCvBjXL48jRVOiEH4zk3ELgXmSkaYM6oSFImO3Pj3D7R//AWdbzulEubnyVvN5y 19 | to81ma+qXhECgYATTD4Nuec1vRkicSk+oBNXxrZfzdbro/iyzIK2Ds45nhGwFSgF 20 | VTFQjZ40tf7ufcOtGGzmTP5jepKZvUESQ+XtojU3s5AHbbp83vt3C3yeV3VlTUBp 21 | AKpWWCRELMOZhfvwx+xcPiUC6oxNHAL1AEJVuJy5IxAysqWEX9X22Rw69QKBgHWG 22 | wDhNKi8m0n312B7bgbc8nwoY39QOQsBj5Nc8+XwI4MNPrBD/U2RfgxiUmzU4Hkoy 23 | 3qQF4Q62MlDUL6KPSaXVl81KMGf3mBhQRyUV+Vl2GcFeUKo2rFpZNSDO8YIZpMS0 24 | aq/PauL62uxCkwaZ6GNW3lqDRiLw4lzadl4rX5FBAoGAQME+148oYfWrAntOSjs1 25 | brIxJpLcArhOhY4ggvz2DRoe1WTF+uLnsIYLd/zULDYIC4D0vY6GmPFubNoxY1db 26 | Kd/G37oE0HkNCJBD+OmyeUBrxhjKZkXnzxaMBBZbDVDllh6loGb5hr4ckBxxI62Y 27 | XghhF6BZhfcHJ6fpmddVfHQ= 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /test/cfg/default/commands/check_dig.cfg: -------------------------------------------------------------------------------- 1 | ## Check a DNS entry 2 | ## This plugin test the DNS service on the specified host using dig 3 | # check_dig -l [-H ] [-p ] [-T ] 4 | # [-w ] [-c ] [-t ] [-a ] [-v] 6 | define command { 7 | command_name check_dig 8 | command_line $NAGIOSPLUGINSDIR$/check_dig -H $HOSTADDRESS$ -l $ARG1$ 9 | } 10 | -------------------------------------------------------------------------------- /test/cfg/default/commands/check_host_alive.cfg: -------------------------------------------------------------------------------- 1 | define command { 2 | command_name check_host_alive 3 | command_line $NAGIOSPLUGINSDIR$/check_ping -H $HOSTADDRESS$ -w 1000,100% -c 3000,100% -p 1 4 | } 5 | 6 | -------------------------------------------------------------------------------- /test/cfg/default/commands/check_nrpe.cfg: -------------------------------------------------------------------------------- 1 | ## Ask a NRPE agent 2 | ## Requires that you have the NRPE daemon running on the remote host. 3 | # check_nrpe -H [-n] [-u] [-p ] [-t ] [-c ] [-a 4 | # ] 5 | define command { 6 | command_name check_nrpe 7 | command_line $NAGIOSPLUGINSDIR$/check_nrpe -H $HOSTADDRESS$ -t 9 -u -c $ARG1$ 8 | } 9 | 10 | -------------------------------------------------------------------------------- /test/cfg/default/commands/check_nrpe_args.cfg: -------------------------------------------------------------------------------- 1 | ## Ask a NRPE agent with arguments (passing arguments may be a security risk) 2 | ## Requires that you have the NRPE daemon running on the remote host. 3 | # check_nrpe -H [-n] [-u] [-p ] [-t ] [-c ] [-a 4 | # ] 5 | define command { 6 | command_name check_nrpe_args 7 | command_line $NAGIOSPLUGINSDIR$/check_nrpe -H $HOSTADDRESS$ -t 9 -u -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$ $ARG5$ 8 | } 9 | -------------------------------------------------------------------------------- /test/cfg/default/commands/check_ping.cfg: -------------------------------------------------------------------------------- 1 | 2 | ## Check ping command 3 | ## Use ping to check connection statistics for a remote host. 4 | # check_ping -H -w ,% -c ,% [-p packets] 5 | # [-t timeout] [-4|-6] 6 | define command { 7 | command_name check_ping 8 | command_line $NAGIOSPLUGINSDIR$/check_icmp -H $HOSTADDRESS$ -w 3000,100% -c 5000,100% -p 10 9 | } 10 | 11 | -------------------------------------------------------------------------------- /test/cfg/default/commands/check_snmp_service.cfg: -------------------------------------------------------------------------------- 1 | 2 | # Check SNMP service presence on target 3 | define command { 4 | command_name check_snmp_service 5 | command_line $NAGIOSPLUGINSDIR$/check_snmp_service -H $HOSTADDRESS$ -C $SNMPCOMMUNITYREAD$ 6 | } 7 | 8 | -------------------------------------------------------------------------------- /test/cfg/default/commands/check_snmp_storage.cfg: -------------------------------------------------------------------------------- 1 | 2 | # default command to check storage by snmp 3 | # Others commands are in os pack. 4 | define command { 5 | command_name check_snmp_storage 6 | command_line $NAGIOSPLUGINSDIR$/check_snmp_storage.pl -H $HOSTADDRESS$ -C $SNMPCOMMUNITYREAD$ -m $ARG1$ -f -w $ARG2$ -c $ARG3$ -S0,1 -o 65535 7 | } 8 | 9 | -------------------------------------------------------------------------------- /test/cfg/default/commands/check_snmp_time.cfg: -------------------------------------------------------------------------------- 1 | 2 | # Compare time between target and shinken 3 | # Doc : http://nagios.frank4dd.com/plugins/manual/check_snmp_time.htm 4 | # Plugin : http://nagios.frank4dd.com/plugins/source/check_snmp_time.pl 5 | define command { 6 | command_name check_snmp_time 7 | command_line $NAGIOSPLUGINSDIR$/check_snmp_time.pl -H $HOSTADDRESS$ -C $SNMPCOMMUNITYREAD$ -f -w $ARG1$ -c $ARG2$ 8 | } 9 | -------------------------------------------------------------------------------- /test/cfg/default/commands/check_tcp.cfg: -------------------------------------------------------------------------------- 1 | ## Check a TCP port 2 | # This plugin tests TCP connections with the specified host (or unix socket). 3 | # check_tcp -H host -p port [-w ] [-c ] [-s ] [-e ] [-q ][-m ] [-d 5 | # ] [-t ] [-r ] [-M ] 6 | # [-v] [-4|-6] [-j] [-D [,]] [-S 7 | # ] [-E] 8 | define command { 9 | command_name check_tcp 10 | command_line $NAGIOSPLUGINSDIR$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/commands/configuration-check.cfg: -------------------------------------------------------------------------------- 1 | define command { 2 | command_name configuration-check 3 | command_line sudo /etc/init.d/shinken check 4 | } 5 | 6 | -------------------------------------------------------------------------------- /test/cfg/default/commands/detailled-host-by-email.cfg: -------------------------------------------------------------------------------- 1 | ## Notify Host by Email with detailled informations 2 | # Service have appropriate macros. Look at unix-fs pack to get an example 3 | define command { 4 | command_name detailled-host-by-email 5 | command_line $PLUGINSDIR$/notify_by_email.py -n host -S localhost -r $CONTACTEMAIL$ -f html -c "$NOTIFICATIONTYPE$,,$HOSTNAME$,,$HOSTADDRESS$,,$LONGDATETIME$"" -o ""$HOSTSTATE$,,$HOSTDURATION$" -d "$_HOSTDETAILLEDDESC$" -i "$_HOSTIMPACT$" 6 | } 7 | -------------------------------------------------------------------------------- /test/cfg/default/commands/detailled-service-by-email.cfg: -------------------------------------------------------------------------------- 1 | 2 | ## Notify Service by Email with detailled informations 3 | # Service have appropriate macros. Look at unix-fs pack to get an example 4 | define command { 5 | command_name detailled-service-by-email 6 | command_line $PLUGINSDIR$/notify_by_email.py -n service -S localhost -r $CONTACTEMAIL$ -f html -c "$NOTIFICATIONTYPE$,,$HOSTNAME$,,$HOSTADDRESS$,,$LONGDATETIME$" -o "$SERVICEDESC$,,$SERVICESTATE$,,$SERVICEOUTPUT$,,$SERVICEDURATION$" -d "$_SERVICEDETAILLEDESC$" -i "$_SERVICEIMPACT$" -a "$_SERVICEFIXACTIONS$" 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/commands/notify-host-by-android-sms.cfg: -------------------------------------------------------------------------------- 1 | 2 | ## Notify Host by SMS (through an Android phone) 3 | # You need both reactionner_tag and module_type in most cases! 4 | define command { 5 | command_name notify-host-by-android-sms 6 | command_line android_sms $CONTACTPAGER$ Host: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $HOSTSTATE$\nInfo: $OUTPUT$\nDate: $DATETIME$ 7 | reactionner_tag android_sms 8 | module_type android_sms 9 | } 10 | -------------------------------------------------------------------------------- /test/cfg/default/commands/notify-host-by-email.cfg: -------------------------------------------------------------------------------- 1 | ## Notify Host by Email 2 | define command { 3 | command_name notify-host-by-email 4 | command_line $PLUGINSDIR$/notify_by_email.py -n host -S localhost -r $CONTACTEMAIL$ -f html -c '$NOTIFICATIONTYPE$,,$HOSTNAME$,,$HOSTADDRESS$,,$LONGDATETIME$' -o '$HOSTSTATE$,,$HOSTDURATION$' 5 | } 6 | -------------------------------------------------------------------------------- /test/cfg/default/commands/notify-host-by-slack.cfg: -------------------------------------------------------------------------------- 1 | ## Notify Host by Email 2 | define command { 3 | command_name notify-host-by-slack 4 | command_line $PLUGINSDIR$/notify_by_slack.py -n host -c "$NOTIFICATIONTYPE$,,$HOSTNAME$,,$HOSTADDRESS$,,$LONGDATETIME$" -o "$HOSTSTATE$,,$HOSTDURATION$" -w -u "$_CONTACTWEBUI_URL$" -K "$_CONTACTSLACK_KEY$" -T "$_CONTACTSLACK_TITLE$" -F "$_CONTACTSLACK_CHANNEL$" -I "$_CONTACTSLACK_ICON$" 5 | } 6 | -------------------------------------------------------------------------------- /test/cfg/default/commands/notify-host-by-xmpp.cfg: -------------------------------------------------------------------------------- 1 | ## Notify Host by XMPP 2 | define command { 3 | command_name notify-host-by-xmpp 4 | command_line $PLUGINSDIR$/notify_by_xmpp.py -a $PLUGINSDIR$/notify_by_xmpp.ini "Host '$HOSTNAME$' is $HOSTSTATE$ - Info : $HOSTOUTPUT$" $CONTACTEMAIL$ 5 | } 6 | -------------------------------------------------------------------------------- /test/cfg/default/commands/notify-service-by-android-sms.cfg: -------------------------------------------------------------------------------- 1 | ## Notify Service by SMS (through an Android phone) 2 | # You need both reactionner_tag and module_type in most cases! 3 | define command { 4 | command_name notify-service-by-android-sms 5 | command_line android_sms $CONTACTPAGER$ Service: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nInfo: $OUTPUT$\nDate: $DATETIME$ 6 | reactionner_tag android_sms 7 | module_type android_sms 8 | } 9 | 10 | -------------------------------------------------------------------------------- /test/cfg/default/commands/notify-service-by-email.cfg: -------------------------------------------------------------------------------- 1 | ## Notify Service by Email 2 | define command { 3 | command_name notify-service-by-email 4 | command_line $PLUGINSDIR$/notify_by_email.py -n service -S localhost -r $CONTACTEMAIL$ -f html -c "$NOTIFICATIONTYPE$,,$HOSTNAME$,,$HOSTADDRESS$,,$LONGDATETIME$" -o "$SERVICEDESC$,,$SERVICESTATE$,,$SERVICEOUTPUT$,,$SERVICEDURATION$" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /test/cfg/default/commands/notify-service-by-slack.cfg: -------------------------------------------------------------------------------- 1 | ## Notify Service by Email 2 | define command { 3 | command_name notify-service-by-slack 4 | command_line $PLUGINSDIR$/notify_by_slack.py -n service -c "$NOTIFICATIONTYPE$,,$HOSTNAME$,,$HOSTADDRESS$,,$LONGDATETIME$" -o "$SERVICEDESC$,,$SERVICESTATE$,,$SERVICEOUTPUT$,,$SERVICEDURATION$" -w -u "$_CONTACTWEBUI_URL$" -K "$_CONTACTSLACK_KEY$" -T "$_CONTACTSLACK_TITLE$" -F "$_CONTACTSLACK_CHANNEL$" -I "$_CONTACTSLACK_ICON$" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /test/cfg/default/commands/notify-service-by-xmpp.cfg: -------------------------------------------------------------------------------- 1 | ## Notify Service by XMPP 2 | define command { 3 | command_name notify-service-by-xmpp 4 | command_line $PLUGINSDIR$/notify_by_xmpp.py -a $PLUGINSDIR$/notify_by_xmpp.ini "$NOTIFICATIONTYPE$ $HOSTNAME$ $SERVICEDESC$ $SERVICESTATE$ $SERVICEOUTPUT$ $LONGDATETIME$" $CONTACTEMAIL$ 5 | } 6 | 7 | -------------------------------------------------------------------------------- /test/cfg/default/commands/reload-shinken.cfg: -------------------------------------------------------------------------------- 1 | define command { 2 | command_name reload-shinken 3 | command_line /etc/init.d/shinken reload 4 | } 5 | 6 | -------------------------------------------------------------------------------- /test/cfg/default/commands/restart-shinken.cfg: -------------------------------------------------------------------------------- 1 | define command { 2 | command_name restart-shinken 3 | command_line /etc/init.d/shinken restart 4 | } 5 | 6 | -------------------------------------------------------------------------------- /test/cfg/default/contactgroups/admins.cfg: -------------------------------------------------------------------------------- 1 | define contactgroup{ 2 | contactgroup_name admins 3 | alias Administrators 4 | members admin 5 | } 6 | 7 | -------------------------------------------------------------------------------- /test/cfg/default/contactgroups/users.cfg: -------------------------------------------------------------------------------- 1 | define contactgroup{ 2 | contactgroup_name users 3 | alias All users 4 | members admin, guest, mohier 5 | } 6 | -------------------------------------------------------------------------------- /test/cfg/default/contacts/admin.cfg: -------------------------------------------------------------------------------- 1 | # This is a default admin 2 | # CHANGE ITS PASSWORD! 3 | 4 | define contact{ 5 | use generic-contact 6 | contact_name admin 7 | alias Administrator 8 | email test@shinken.com 9 | pager 0600000000 ; contact phone number 10 | password admin 11 | is_admin 1 12 | expert 1 13 | } 14 | 15 | -------------------------------------------------------------------------------- /test/cfg/default/contacts/anonymous.cfg: -------------------------------------------------------------------------------- 1 | # This is an anonymous contact ... used to allow access to some pages without any login ! 2 | define contact{ 3 | use generic-contact 4 | contact_name anonymous 5 | alias Anonymous 6 | email nobody@localhost 7 | is_admin 1 8 | can_submit_commands 0 9 | } 10 | -------------------------------------------------------------------------------- /test/cfg/default/contacts/fred.cfg: -------------------------------------------------------------------------------- 1 | define contact{ 2 | use slack-contact 3 | contact_name mohier 4 | alias Fred 5 | email test@gmail.com 6 | pager 0600000000 7 | password fred 8 | is_admin 1 9 | expert 1 10 | } 11 | -------------------------------------------------------------------------------- /test/cfg/default/contacts/guest.cfg: -------------------------------------------------------------------------------- 1 | 2 | # This is a default guest user 3 | # CHANGE ITS PASSWORD or remove it 4 | define contact{ 5 | use generic-contact 6 | contact_name guest 7 | alias Guest user 8 | email guest@localhost 9 | password guest 10 | can_submit_commands 0 11 | is_admin 0 12 | } 13 | 14 | -------------------------------------------------------------------------------- /test/cfg/default/daemons/brokerd.ini: -------------------------------------------------------------------------------- 1 | [daemon] 2 | 3 | # The daemon will chdir into the directory workdir when launched 4 | workdir = /var/run/shinken 5 | logdir = /var/log/shinken 6 | 7 | pidfile=%(workdir)s/brokerd.pid 8 | 9 | # Using default values for following config variables value: 10 | # Paths, if not absolute paths, are relative to workdir. 11 | 12 | #user=shinken ; by default it's the current user 13 | #group=shinken ; by default it's the current group 14 | 15 | 16 | #host=0.0.0.0 17 | #port=7772 18 | 19 | #idontcareaboutsecurity=0 20 | 21 | # Set to 0 if you want to make this daemon NOT run 22 | daemon_enabled=1 23 | 24 | #-- SSL configuration -- 25 | use_ssl=0 26 | #ca_cert=/etc/shinken/certs/ca.pem 27 | #server_cert=/etc/shinken/certs/server.cert 28 | #server_key=/etc/shinken/certs/server.key 29 | #hard_ssl_name_check=0 30 | http_backend=auto 31 | daemon_thread_pool_size=16 32 | 33 | #-- Local log management -- 34 | # Enabled by default to ease troubleshooting 35 | use_local_log=1 36 | local_log=%(logdir)s/brokerd.log 37 | # Accepted log level values: DEBUG,INFO,WARNING,ERROR,CRITICAL 38 | log_level=WARNING 39 | 40 | 41 | #-- External modules watchdog -- 42 | # If a module got a brok queue() higher than this value, it will be 43 | # killed and restart. Put to 0 to disable it 44 | max_queue_size=100000 45 | 46 | # The path to the modules directory 47 | modules_dir=/var/lib/shinken/modules 48 | 49 | modules_dir=/var/lib/shinken/modules 50 | user=shinken 51 | group=shinken 52 | -------------------------------------------------------------------------------- /test/cfg/default/daemons/pollerd.ini: -------------------------------------------------------------------------------- 1 | [daemon] 2 | 3 | #-- Global Configuration 4 | #user=shinken ; if not set then by default it's the current user. 5 | #group=shinken ; if not set then by default it's the current group. 6 | # Set to 0 if you want to make this daemon NOT run 7 | daemon_enabled=1 8 | 9 | #-- Path Configuration 10 | # The daemon will chdir into the directory workdir when launched 11 | # paths variables values, if not absolute paths, are relative to workdir. 12 | # using default values for following config variables value: 13 | workdir = /var/run/shinken 14 | logdir = /var/log/shinken 15 | pidfile=%(workdir)s/pollerd.pid 16 | 17 | #-- Network configuration 18 | # host=0.0.0.0 19 | # port=7771 20 | # http_backend=auto 21 | # idontcareaboutsecurity=0 22 | 23 | #-- SSL configuration -- 24 | use_ssl=0 25 | # WARNING : Put full paths for certs 26 | #ca_cert=/etc/shinken/certs/ca.pem 27 | #server_cert=/etc/shinken/certs/server.cert 28 | #server_key=/etc/shinken/certs/server.key 29 | #hard_ssl_name_check=0 30 | 31 | #-- Local log management -- 32 | # Enabled by default to ease troubleshooting 33 | use_local_log=1 34 | local_log=%(logdir)s/pollerd.log 35 | # accepted log level values= DEBUG,INFO,WARNING,ERROR,CRITICAL 36 | log_level=WARNING 37 | 38 | # The path to the modules directory 39 | modules_dir=/var/lib/shinken/modules 40 | 41 | modules_dir=/var/lib/shinken/modules 42 | user=shinken 43 | group=shinken 44 | -------------------------------------------------------------------------------- /test/cfg/default/daemons/reactionnerd.ini: -------------------------------------------------------------------------------- 1 | [daemon] 2 | 3 | # The daemon will chdir into the directory workdir when launched 4 | workdir = /var/run/shinken 5 | logdir = /var/log/shinken 6 | 7 | pidfile=%(workdir)s/reactionnerd.pid 8 | 9 | port=7769 10 | #host=0.0.0.0 11 | #user=shinken 12 | #group=shinken 13 | idontcareaboutsecurity=0 14 | 15 | # Set to 0 if you want to make this daemon NOT run 16 | daemon_enabled=1 17 | 18 | #-- SSL configuration -- 19 | use_ssl=0 20 | #ca_cert=/etc/shinken/certs/ca.pem 21 | #server_cert=/etc/shinken/certs/server.cert 22 | #server_key=/etc/shinken/certs/server.key 23 | #hard_ssl_name_check=0 24 | http_backend=auto 25 | daemon_thread_pool_size=16 26 | 27 | #-- Local log management -- 28 | # Enabled by default to ease troubleshooting 29 | use_local_log=1 30 | local_log=%(logdir)s/reactionnerd.log 31 | 32 | # accepted log level values= DEBUG,INFO,WARNING,ERROR,CRITICAL 33 | log_level=WARNING 34 | 35 | # The path to the modules directory 36 | modules_dir=/var/lib/shinken/modules 37 | 38 | modules_dir=/var/lib/shinken/modules 39 | user=shinken 40 | group=shinken 41 | -------------------------------------------------------------------------------- /test/cfg/default/daemons/receiverd.ini: -------------------------------------------------------------------------------- 1 | [daemon] 2 | 3 | # The daemon will chdir into the directory workdir when launched 4 | workdir = /var/run/shinken 5 | logdir = /var/log/shinken 6 | 7 | pidfile=%(workdir)s/receiverd.pid 8 | 9 | port=7773 10 | #host=0.0.0.0 11 | #user=shinken 12 | #group=shinken 13 | idontcareaboutsecurity=0 14 | 15 | # Set to 0 if you want to make this daemon NOT run 16 | daemon_enabled=1 17 | 18 | #-- SSL configuration -- 19 | use_ssl=0 20 | #ca_cert=/etc/shinken/certs/ca.pem 21 | #server_cert=/etc/shinken/certs/server.cert 22 | #server_key=/etc/shinken/certs/server.key 23 | #hard_ssl_name_check=0 24 | http_backend=auto 25 | 26 | #-- Local log management -- 27 | # Enabled by default to ease troubleshooting 28 | use_local_log=1 29 | local_log=%(logdir)s/receiverd.log 30 | 31 | # accepted log level values= DEBUG,INFO,WARNING,ERROR,CRITICAL 32 | log_level=WARNING 33 | 34 | # The path to the modules directory 35 | modules_dir=/var/lib/shinken/modules 36 | 37 | modules_dir=/var/lib/shinken/modules 38 | user=shinken 39 | group=shinken 40 | -------------------------------------------------------------------------------- /test/cfg/default/daemons/schedulerd.ini: -------------------------------------------------------------------------------- 1 | [daemon] 2 | 3 | # The daemon will chdir into the directory workdir when launched 4 | workdir = /var/run/shinken 5 | logdir = /var/log/shinken 6 | 7 | pidfile=%(workdir)s/schedulerd.pid 8 | 9 | port=7768 10 | #host=0.0.0.0 11 | #user=shinken 12 | #group=shinken 13 | idontcareaboutsecurity=0 14 | 15 | # To be changed, to match your real modules directory installation 16 | #modulesdir=modules 17 | 18 | # Set to 0 if you want to make this daemon NOT run 19 | daemon_enabled=1 20 | 21 | 22 | #-- SSL configuration -- 23 | use_ssl=0 24 | # WARNING : Use full paths for certs 25 | #ca_cert=/etc/shinken/certs/ca.pem 26 | #server_cert=/etc/shinken/certs/server.cert 27 | #server_key=/etc/shinken/certs/server.key 28 | hard_ssl_name_check=0 29 | http_backend=auto 30 | daemon_thread_pool_size=16 31 | 32 | #-- Local log management -- 33 | # Enabled by default to ease troubleshooting 34 | use_local_log=1 35 | local_log=%(logdir)s/schedulerd.log 36 | 37 | # accepted log level values= DEBUG,INFO,WARNING,ERROR,CRITICAL 38 | log_level=WARNING 39 | 40 | # The path to the modules directory 41 | modules_dir=/var/lib/shinken/modules 42 | 43 | modules_dir=/var/lib/shinken/modules 44 | user=shinken 45 | group=shinken 46 | -------------------------------------------------------------------------------- /test/cfg/default/dependencies/dependencies.cfg: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | 3 | #sim-vm, sim-vm2 and sim-vm3 depends upon shinkenpoller 4 | 5 | # Note: 6 | # dependent_host_name should contain a list ... but it is not managed currently ! 7 | # Shinken manages it correctly but not Alignak ... 8 | define hostdependency{ 9 | name test1 10 | host_name shinkenpoller 11 | dependent_host_name vm-fred 12 | execution_failure_criteria u,d 13 | notification_failure_criteria u,d 14 | dependency_period 24x7 15 | } 16 | define hostdependency{ 17 | name test2 18 | host_name shinkenpoller 19 | dependent_host_name sim-vm2 20 | execution_failure_criteria u,d 21 | notification_failure_criteria u,d 22 | dependency_period 24x7 23 | } 24 | 25 | define hostdependency{ 26 | name test3 27 | host_name Shinken 28 | dependent_host_name shinkenpoller 29 | execution_failure_criteria u,d 30 | notification_failure_criteria u,d 31 | dependency_period 24x7 32 | } 33 | -------------------------------------------------------------------------------- /test/cfg/default/dependencies/sample.cfg: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | 3 | # This is the HARD way for define dependencies. Please look at the 4 | # service_dependencies property for the services instead! 5 | 6 | #define servicedependency { 7 | # host_name dc01 8 | # service_description ActiveDirectory 9 | # dependent_host_name dc07 10 | # dependent_service_description ActiveDirectory 11 | # execution_failure_criteria o 12 | # notification_failure_criteria w,u 13 | # dependency_period 24x7 14 | # } 15 | 16 | #define hostdependency{ 17 | # host_name dc01 18 | # dependent_host_name localhost 19 | # execution_failure_criteria o 20 | # notification_failure_criteria u 21 | # dependency_period 24x7 22 | # } 23 | -------------------------------------------------------------------------------- /test/cfg/default/discovery/discovery.cfg: -------------------------------------------------------------------------------- 1 | # ############### WARNING : the discovery part is in deprecated mode in theframework. Should be moved to /contrib 2 | # or as a module in the next versions 3 | 4 | # Log file of the discovery command 5 | log_file=/var/log/shinken/discovery.log 6 | 7 | 8 | # Configuration files with common discovery objects 9 | # like discoveryrules or runners 10 | cfg_dir=../packs 11 | 12 | # Then some useful templates 13 | cfg_dir=../templates 14 | 15 | # Default discovery rules and runners. Should be AFTER 16 | # the packs ones ;) 17 | cfg_file=discovery_rules.cfg 18 | cfg_file=discovery_runs.cfg 19 | 20 | # Load modules, for possible bdd connection 21 | cfg_file=../shinken.cfg 22 | 23 | # Load all commands that will be used 24 | cfg_dir=../commands 25 | 26 | # Some important macros 27 | cfg_dir=../resource.d 28 | 29 | # Lock file (with pid) for Arbiterd 30 | lock_file=discovery.pid 31 | 32 | # Strip FQDN of the name ID to keep only the 33 | # basename of the element 34 | strip_idname_fqdn=1 35 | 36 | # Change this value to increase the discovery 37 | # scripts timeout. Start with a quite huge value, one hour. 38 | runners_timeout=3600 39 | -------------------------------------------------------------------------------- /test/cfg/default/discovery/discovery_runs.cfg: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Discovery_commands 3 | #=============================================================================== 4 | # Download: 5 | # - nmap_discovery, vmware_esx_discovery: 6 | # Shinken's sources (in libexec) 7 | # - fs_discovery, cluster_discovery: 8 | # ??? 9 | ################################################################################ 10 | 11 | ## NMAP Discovery 12 | # nmap_discovery_runner.py [options] -t nmap scanning targets 13 | define command { 14 | command_name nmap_discovery 15 | command_line $PLUGINSDIR$/discovery/nmap_discovery_runner.py --min-rate $NMAPMINRATE$ --max-retries $NMAPMAXRETRIES$ -t $NMAPTARGETS$ 16 | } 17 | 18 | 19 | # nmap runner, the will use the nmap_discovery command. 20 | define discoveryrun { 21 | discoveryrun_name nmap 22 | discoveryrun_command nmap_discovery 23 | } 24 | 25 | 26 | ## VMWare ESX Discovery 27 | # vmware_discovery_runner.py [options] 28 | define command { 29 | command_name vmware_esx_discovery 30 | command_line $PLUGINSDIR$/discovery/vmware_discovery_runner.py -V $VCENTER$ -u $VCENTERLOGIN$ -p $VCENTERPASSWORD$ -r "lower|nofqdn" 31 | } 32 | 33 | # vsphere runner ,that will as the vmware_esx_discovery command 34 | define discoveryrun { 35 | discoveryrun_name vsphere 36 | discoveryrun_command vmware_esx_discovery 37 | } 38 | -------------------------------------------------------------------------------- /test/cfg/default/escalations/sample.cfg: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Define escalation the OLD school way. 4 | # Better use the simple "escalation" way! (in shinken-specific.cfg) 5 | 6 | #define serviceescalation{ 7 | # host_name localhost 8 | # hostgroup_name windows-servers 9 | # service_description Root Partition 10 | # contacts GNULinux_Administrator 11 | # contact_groups admins 12 | # first_notification 2 13 | # last_notification 5 14 | # notification_interval 1 15 | # escalation_period 24x7 16 | # escalation_options w,u,c,r 17 | # } 18 | -------------------------------------------------------------------------------- /test/cfg/default/hostgroups/linux.cfg: -------------------------------------------------------------------------------- 1 | define hostgroup{ 2 | hostgroup_name linux ; The name of the hostgroup 3 | alias Linux Servers ; Long name of the group 4 | #members 5 | } 6 | -------------------------------------------------------------------------------- /test/cfg/default/hostgroups/test.cfg: -------------------------------------------------------------------------------- 1 | define hostgroup{ 2 | hostgroup_name main_group 3 | alias Main 4 | hostgroup_members sub_main_1, sub_main_2 5 | } 6 | define hostgroup{ 7 | hostgroup_name sub_main_1 8 | alias Sub group of main 1 9 | members Shinken, shinkenpoller 10 | } 11 | define hostgroup{ 12 | hostgroup_name sub_main_2 13 | alias Sub group of main 2 14 | members vm-fred, sim-vm2, sim-vm3 15 | } 16 | 17 | define hostgroup { 18 | alias HG_NO_SPACES_ALIAS 19 | hostgroup_name HG_NO_SPACES 20 | members vm-fred, sim-vm2, sim-vm3 21 | } 22 | 23 | define hostgroup { 24 | alias HG WITH SPACES ALIAS 25 | hostgroup_name HG WITH SPACES 26 | members vm-fred, sim-vm2, sim-vm3 27 | } -------------------------------------------------------------------------------- /test/cfg/default/hosts/graphite.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | use generic-host, linux-snmp, graphite, important 3 | host_name graphite 4 | address graphite 5 | alias Graphite on VM 6 | 7 | business_impact 3 8 | 9 | hostgroups servers 10 | 11 | contact_groups admins, users 12 | 13 | stalking_options o,d,u 14 | 15 | # Graphite prefix 16 | #_GRAPHITE_PRE test 17 | 18 | # GPS 19 | _LOC_LAT 45.054700 20 | _LOC_LNG 5.080856 21 | 22 | # Defined in host template 23 | custom_views host 24 | } 25 | 26 | -------------------------------------------------------------------------------- /test/cfg/default/hosts/knm-glpi.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | use generic-host, https 3 | contact_groups admins, users 4 | host_name KNM-Glpi 5 | alias KNM - Glpi 6 | display_name KNM (GLPI) 7 | address kiosks.ipmfrance.com 8 | 9 | # GPS 10 | _LOC_LAT 43.542780 11 | _LOC_LNG 1.510058 12 | 13 | # Web site configuration 14 | _CHECK_HTTPS_DOMAIN_NAME $HOSTADDRESS$ 15 | _CHECK_HTTPS_PORT 443 16 | _CHECK_HTTPS_URI / 17 | _CHECK_HTTPS_AUTH #login:password 18 | _CHECK_HTTPS_MINIMUM_DAYS 30 19 | } 20 | -------------------------------------------------------------------------------- /test/cfg/default/hosts/knm-shinken.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | use generic-host, http, https 3 | contact_groups admins 4 | host_name KNM-Shinken 5 | alias KNM - Shinken 6 | display_name KNM-Shinken 7 | address shinken.ipmfrance.com 8 | 9 | # GPS 10 | _LOC_LAT 43.542780 11 | _LOC_LNG 1.510058 12 | 13 | # Web site configuration 14 | _CHECK_HTTPS_DOMAIN_NAME $HOSTADDRESS$ 15 | _CHECK_HTTPS_PORT 7767 16 | _CHECK_HTTPS_URI / 17 | _CHECK_HTTPS_AUTH #login:password 18 | _CHECK_HTTPS_MINIMUM_DAYS 30 19 | } 20 | -------------------------------------------------------------------------------- /test/cfg/default/hosts/localhost.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/test/cfg/default/hosts/localhost.cfg -------------------------------------------------------------------------------- /test/cfg/default/hosts/main.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | use poll_short, linux-snmp, shinken2 3 | contact_groups admins 4 | host_name Shinken 5 | address shinkenmain 6 | 7 | # Checking part 8 | # check_command check_myself 9 | 10 | _test 123-1221312.test.fred 11 | 12 | #custom_views default 13 | custom_views linux-snmp 14 | 15 | _shinken_daemon arbiter,broker,scheduler,poller,reactionner,receiver 16 | #_shinken_arbiters arbiter-master, arbiter-spare 17 | #_shinken_brokers broker-master, broker-spare 18 | #_shinken_receivers receiver-master, receiver-spare 19 | #_shinken_reactionners reactionner-master, reactionner-spare 20 | #_shinken_pollers poller-master, poller-spare, poller-site-1 21 | } 22 | 23 | -------------------------------------------------------------------------------- /test/cfg/default/hosts/site-1/sim-vm.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | use poll_short, generic-host, glances, nsca-host 3 | contact_groups admins 4 | host_name vm-fred 5 | address 192.168.0.20 6 | 7 | #poller_tag site-1 8 | 9 | #parents shinkenpoller 10 | 11 | # Glances Macros 12 | _FS C: 13 | _IFACES LAN1 14 | 15 | # Windows WMI macros ... 16 | _WINDOWS_MEM_WARN 10 17 | _WINDOWS_MEM_CRIT 20 18 | _WINDOWS_EXCLUDED_AUTO_SERVICES (IAStorDataMgrSvc)|(MMCSS)|(ShellHWDetection)|(sppsvc)|(clr_optimization_v4.0.30319_32) 19 | } 20 | 21 | define host{ 22 | use generic-host, windows 23 | contact_groups admins 24 | host_name sim-vm2 25 | address 192.168.0.22 26 | 27 | #poller_tag site-1 28 | 29 | #parents shinkenpoller 30 | 31 | # Windows WMI macros ... 32 | _WINDOWS_MEM_WARN 10 33 | _WINDOWS_MEM_CRIT 20 34 | _WINDOWS_EXCLUDED_AUTO_SERVICES (IAStorDataMgrSvc)|(MMCSS)|(ShellHWDetection)|(sppsvc)|(clr_optimization_v4.0.30319_32) 35 | } 36 | 37 | define host{ 38 | use generic-host, windows 39 | contact_groups admins 40 | host_name sim-vm3 41 | address 192.168.0.23 42 | 43 | #poller_tag site-1 44 | 45 | #parents shinkenpoller 46 | 47 | # Windows WMI macros ... 48 | _WINDOWS_MEM_WARN 10 49 | _WINDOWS_MEM_CRIT 20 50 | _WINDOWS_EXCLUDED_AUTO_SERVICES (IAStorDataMgrSvc)|(MMCSS)|(ShellHWDetection)|(sppsvc)|(clr_optimization_v4.0.30319_32) 51 | } 52 | 53 | -------------------------------------------------------------------------------- /test/cfg/default/hosts/site-1/site-1.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | use poll_short, generic-host, glances, nsca-host 3 | contact_groups admins 4 | host_name shinkenpoller 5 | address 192.168.0.41 6 | #realm site-1 7 | #poller_tag site-1 8 | 9 | # Macros 10 | _LOAD_WARN 2 11 | _LOAD_CRIT 3 12 | _CPU_WARN 80 13 | _CPU_CRIT 90 14 | _MEMORY_WARN 90 15 | _MEMORY_CRIT 95 16 | _FS / 17 | _FS_WARN 90 18 | _FS_CRIT 95 19 | _IFACES eth0 20 | _NET_WARN 7500000 21 | _NET_CRIT 10000000 22 | 23 | _shinken_daemon poller 24 | } 25 | -------------------------------------------------------------------------------- /test/cfg/default/hosts/spare.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | use poll_short, linux-snmp, shinken2 3 | contact_groups admins 4 | host_name shinkenspare 5 | alias Shinken (spare) 6 | address shinkenspare 7 | 8 | # Checking part 9 | # check_command check_myself 10 | 11 | _test 123-1221312.test.fred 12 | 13 | #custom_views default 14 | custom_views linux-snmp 15 | 16 | _shinken_daemon arbiter,broker,scheduler,poller,reactionner,receiver 17 | } 18 | 19 | -------------------------------------------------------------------------------- /test/cfg/default/hosts/switch.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | use poll_short, switch, san_switch 3 | contact_groups admins 4 | host_name tony 5 | address 192.168.0.250 6 | 7 | #poller_tag site-1 8 | 9 | parents shinkenpoller 10 | } 11 | 12 | -------------------------------------------------------------------------------- /test/cfg/default/modules/auth-ws-glpi.cfg: -------------------------------------------------------------------------------- 1 | ## Module: auth-ws-glpi 2 | ## Loaded by: WebUI 3 | 4 | # Check authentification using login/password in Glpi (http://www.glpi-project.org/) database. 5 | define module { 6 | module_name auth-ws-glpi 7 | module_type authentication 8 | 9 | # Glpi Web service URI 10 | # Assuming Glpi is located on the same server in the glpi directory 11 | uri http://glpi/glpi/plugins/webservices/xmlrpc.php 12 | } 13 | -------------------------------------------------------------------------------- /test/cfg/default/modules/glpi-helpdesk.cfg: -------------------------------------------------------------------------------- 1 | ## Module: glpi-helpdesk 2 | ## Loaded by: WebUI 3 | 4 | # GLPI needs Webservices plugin to be installed and enabled. 5 | define module { 6 | module_name glpi-helpdesk 7 | module_type helpdesk 8 | 9 | # Glpi Web service URI 10 | uri http://glpi/glpi/plugins/webservices/xmlrpc.php 11 | # Default : shinken 12 | login_name shinken 13 | # Default : shinken 14 | login_password Shinken-2015 15 | 16 | # Web service source 17 | # Default source is shinken 18 | #source Shinken 19 | } 20 | -------------------------------------------------------------------------------- /test/cfg/default/modules/glpidb.cfg: -------------------------------------------------------------------------------- 1 | ## Module: glpidb 2 | ## Loaded by: Broker 3 | # Export data to the GLPI database from a Shinken broker. 4 | define module { 5 | module_name glpidb 6 | module_type glpidb 7 | 8 | host glpi 9 | port 3306 10 | 11 | database glpidb 12 | user shinken 13 | password shinken 14 | 15 | # Update Shinken state table : hostname/service 16 | update_shinken_state 0 17 | # Update services events table : log of all events 18 | update_services_events 1 19 | # Update hosts state table 20 | update_hosts 1 21 | # Update services state table 22 | update_services 1 23 | # Update acknowledges table 24 | update_acknowledges 0 25 | # Update availability table 26 | update_availability 0 27 | 28 | # Every commit_period seconds, up to commit_volume events are inserted into the Glpi DB ... 29 | commit_period 10 30 | commit_volume 100 31 | 32 | # Every db_test_period seconds, the database connection is tested if connection has been lost ... 33 | db_test_period 30 34 | } 35 | -------------------------------------------------------------------------------- /test/cfg/default/modules/import-glpi.cfg: -------------------------------------------------------------------------------- 1 | ## Module: import-glpi 2 | ## Loaded by: Arbiter 3 | # It loads configuration from GLPI web application. 4 | # All configuration read from the DB will be added to those read from the 5 | # standard flat files. -- Be careful of duplicated names! 6 | # GLPI needs Webservices and Monitoring plugins installed and enabled. 7 | define module { 8 | module_name import-glpi 9 | module_type import-glpi 10 | # Glpi Web service URI 11 | uri http://glpi/glpi/plugins/webservices/xmlrpc.php 12 | # Default : shinken 13 | login_name shinken 14 | # Default : shinken 15 | login_password Shinken-2015 16 | # Default : empty to get all objects declared in GLPI 17 | # Tag may be associated with a Glpi entity to filter monitored hosts/services 18 | # Note: still usable for compatibility purpose, it is better to use tags attribute 19 | tag 20 | # Default : empty to get all objects declared in GLPI 21 | # tags may contain a list of tags to get several entities from GLPI 22 | # When getting objects from several entities, the module deletes duplicate objects 23 | #tags entity-1, entity-2, entity-3 24 | tags Demo 25 | 26 | 27 | # Create files on disk and do not send data to arbiter 28 | #target files 29 | target_directory /etc/shinken/glpi 30 | } 31 | -------------------------------------------------------------------------------- /test/cfg/default/modules/named_pipe.cfg: -------------------------------------------------------------------------------- 1 | ## Module: named-pipe 2 | ## Loaded by: Poller, Arbiter, Receiver 3 | # Receive passive host and service results, typically from check_mk plugins. 4 | # No other commands or inputs accepted (Restricted to host and service results) 5 | define module { 6 | module_name named-pipe 7 | module_type named_pipe 8 | command_file /var/lib/shinken/nagios.cmd 9 | } 10 | -------------------------------------------------------------------------------- /test/cfg/default/modules/nsca.cfg: -------------------------------------------------------------------------------- 1 | ## Module: nsca 2 | ## Loaded by: Arbiter, Receiver 3 | # Receive check results sent with NSCA protocol. 4 | define module { 5 | module_name nsca 6 | module_type nsca_server 7 | 8 | # Default is listening on all address, TCP port 5667 9 | host * 10 | port 5667 11 | 12 | # Encryption method: 13 | # 0 for no encryption (default) 14 | # 1 for simple Xor 15 | # No other encryption method available! 16 | encryption_method 1 17 | password Test-VM 18 | 19 | # Maximum packet age defines the maximum delay 20 | # (in seconds) for a packet to be considered as staled 21 | max_packet_age 60 22 | 23 | # If check_future_packet attribute is defined, packets 24 | # more recent than current timestamp are dropped 25 | check_future_packet 1 26 | 27 | # Payload length is length of effective data sent : 28 | # . -1 to accept any payload length 29 | # . 512 or 4096 depending upon NSCA client configuration 30 | # If packet payload is not the right size, packet is dropped 31 | payload_length -1 32 | 33 | # Buffer length is maximum length of received data : 34 | # should be greater than payload length 35 | # Default is 8192 36 | #buffer_length 8192 37 | 38 | # backlog is the maximum number of concurrent sockets 39 | # Default is 10 40 | #backlog 10 41 | } 42 | -------------------------------------------------------------------------------- /test/cfg/default/modules/pickle-retention-file-scheduler.cfg: -------------------------------------------------------------------------------- 1 | ## Module: pickle-retention-file 2 | ## Loaded by: Scheduler 3 | # Retention file to keep state between process restarts. 4 | define module { 5 | module_name pickle-retention-file 6 | module_type pickle_retention_file 7 | path /var/lib/shinken/retention.dat 8 | } 9 | -------------------------------------------------------------------------------- /test/cfg/default/modules/retention-mongodb.cfg: -------------------------------------------------------------------------------- 1 | ## Module: mongodb-scheduler-retention 2 | ## Loaded by: scheduler 3 | # 4 | define module { 5 | module_name retention-mongodb 6 | module_type scheduler-retention 7 | 8 | # MongoDB connection string 9 | # EXAMPLE 10 | # To describe a connection to a replica set named test, with the following mongod hosts: 11 | # db1.example.net on port 27017 with sysop credentials and 12 | # db2.example.net on port 2500. 13 | # You would use a connection string that resembles the following: 14 | # uri mongodb://sysop:password@db1.example.net,db2.example.net:2500/?replicaSet=test 15 | # 16 | # Default is a non replicated localhost server 17 | #uri mongodb://192.168.0.50 18 | uri mongodb://localhost 19 | 20 | # Database name where to store the retention collections 21 | # Default is shinken 22 | #database shinken 23 | 24 | # Load retention data from a previous retention using flat file 25 | # Useful to migrate from flat file retention to MongoDB retention ... 26 | #path /var/lib/shinken/retention.dat 27 | 28 | # Default collections names 29 | # ----------------------------- 30 | # Hosts and services objects 31 | # Comments and downtimes 32 | # ----------------------------- 33 | # Comments and downtimes are stored inside hosts/services objects AND in comments/downtimes 34 | # to make them persist when they are deleted ... 35 | #hosts_collection_name retention_hosts 36 | #services_collection_name retention_services 37 | #comments_collection_name retention_comments 38 | #downtimess_collection_name retention_downtimes 39 | } 40 | -------------------------------------------------------------------------------- /test/cfg/default/modules/sample.cfg: -------------------------------------------------------------------------------- 1 | # Here is a sample module that will do nothing :) 2 | #define module{ 3 | # module_name module-sample 4 | # module_type module-sample 5 | # key1 value1 6 | # key2 value2 7 | #} 8 | -------------------------------------------------------------------------------- /test/cfg/default/modules/simple-log.cfg: -------------------------------------------------------------------------------- 1 | ## Module: simple-log 2 | ## Loaded by: Broker 3 | # Centralized log management for all Shinken processes. This module consumes 4 | # log broks (inter process messages) and exports them to a flat-file local to 5 | # where the active broker is running. 6 | define module { 7 | module_name simple-log 8 | module_type simple-log 9 | path /var/log/shinken/shinken.log 10 | archive_path /var/log/shinken/archives/ 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/modules/ws_arbiter.cfg: -------------------------------------------------------------------------------- 1 | ## Module: ws-arbiter 2 | ## Loaded by: Arbiter, Receiver 3 | # WebService module for the Arbiter and Receiver so you can send (POST) passive 4 | # checks to it :) 5 | define module { 6 | module_name ws-arbiter 7 | module_type ws_arbiter 8 | host 0.0.0.0 9 | port 7760 10 | username shinken 11 | password shinken 12 | } 13 | -------------------------------------------------------------------------------- /test/cfg/default/notificationways/detailled-email.cfg: -------------------------------------------------------------------------------- 1 | # This is how emails are sent, 24x7 way. 2 | define notificationway{ 3 | notificationway_name detailled-email 4 | service_notification_period 24x7 5 | host_notification_period 24x7 6 | service_notification_options c,w,r 7 | host_notification_options d,u,r,f,s 8 | service_notification_commands detailled-service-by-email ; send service notifications via email 9 | host_notification_commands detailled-host-by-email ; send host notifications via email 10 | min_business_impact 1 11 | } 12 | 13 | -------------------------------------------------------------------------------- /test/cfg/default/notificationways/email.cfg: -------------------------------------------------------------------------------- 1 | # This is how emails are sent, 24x7 way. 2 | define notificationway{ 3 | notificationway_name email 4 | service_notification_period 24x7 5 | host_notification_period 24x7 6 | service_notification_options c,w,r 7 | host_notification_options d,u,r,f,s 8 | service_notification_commands notify-service-by-email ; send service notifications via email 9 | host_notification_commands notify-host-by-email ; send host notifications via email 10 | } 11 | 12 | -------------------------------------------------------------------------------- /test/cfg/default/notificationways/slack.cfg: -------------------------------------------------------------------------------- 1 | # This is how emails are sent, 24x7 way. 2 | define notificationway{ 3 | notificationway_name slack 4 | service_notification_period workhours 5 | host_notification_period 24x7 6 | service_notification_options w,u,c,r,f,s 7 | host_notification_options d,u,r,f,s 8 | service_notification_commands notify-service-by-slack 9 | host_notification_commands notify-host-by-slack 10 | } 11 | 12 | -------------------------------------------------------------------------------- /test/cfg/default/notificationways/sms-android.cfg: -------------------------------------------------------------------------------- 1 | # This is how sms are sent, 24x7 way. 2 | # Tweak it to fit your needs. 3 | define notificationway{ 4 | notificationway_name android-sms 5 | service_notification_period 24x7 6 | host_notification_period 24x7 7 | service_notification_options c,w,r 8 | host_notification_options d,u,r,f,s 9 | service_notification_commands notify-service-by-android-sms ; send service notifications via SMS 10 | host_notification_commands notify-host-by-android-sms ; send host notifications via SMS 11 | } 12 | 13 | -------------------------------------------------------------------------------- /test/cfg/default/packs/glances/commands.cfg: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------- 2 | # 3 | # Linux standard check with glances 4 | # 5 | # ----------------------------------------------------------------- 6 | 7 | define command { 8 | command_name get_glances_system 9 | command_line $PLUGINSDIR$/checkglances.py -H $HOSTADDRESS$ -s system 10 | } 11 | 12 | define command { 13 | command_name check_glances_load 14 | command_line $PLUGINSDIR$/checkglances.py -H $HOSTADDRESS$ -w $_HOSTLOAD_WARN$ -c $_HOSTLOAD_CRIT$ -s load 15 | } 16 | 17 | define command { 18 | command_name check_glances_uptime 19 | command_line $PLUGINSDIR$/checkglances.py -H $HOSTADDRESS$ -w $_HOSTUPTIME_WARN$ -c $_HOSTUPTIME_CRIT$ -s uptime 20 | } 21 | 22 | define command { 23 | command_name check_glances_cpu 24 | command_line $PLUGINSDIR$/checkglances.py -H $HOSTADDRESS$ -w $_HOSTCPU_WARN$ -c $_HOSTCPU_CRIT$ -s cpu 25 | } 26 | 27 | define command { 28 | command_name check_glances_memory 29 | command_line $PLUGINSDIR$/checkglances.py -H $HOSTADDRESS$ -w $_HOSTMEMORY_WARN$ -c $_HOSTMEMORY_CRIT$ -s mem 30 | } 31 | 32 | define command { 33 | command_name check_glances_swap 34 | command_line $PLUGINSDIR$/checkglances.py -H $HOSTADDRESS$ -w $_HOSTSWAP_WARN$ -c $_HOSTSWAP_CRIT$ -s swap 35 | } 36 | 37 | define command { 38 | command_name check_glances_fs 39 | command_line $PLUGINSDIR$/checkglances.py -H $HOSTADDRESS$ -w $_HOSTFS_WARN$ -c $_HOSTFS_CRIT$ -s fs -e $ARG1$ 40 | } 41 | 42 | define command { 43 | command_name check_glances_net 44 | command_line $PLUGINSDIR$/checkglances.py -H $HOSTADDRESS$ -w $_HOSTNET_WARN$ -c $_HOSTNET_CRIT$ -s net -e $ARG1$ 45 | } 46 | -------------------------------------------------------------------------------- /test/cfg/default/packs/glances/services/cpu.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Cpu 3 | use glances-service 4 | register 0 5 | host_name glances 6 | check_command check_glances_cpu 7 | 8 | _DETAILLEDESC Detect abnormal CPU usage 9 | _IMPACT Slow down applications hosted by the system 10 | _FIXACTIONS If recurrent situation then make performance audit 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/glances/services/fs.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Fs_$KEY$ 3 | use glances-service 4 | register 0 5 | host_name glances 6 | check_command check_glances_fs!$KEY$ 7 | duplicate_foreach _FS 8 | 9 | _DETAILLEDESC Overall disks usage 10 | _IMPACT Depends on disks, cause system instability 11 | _FIXACTIONS Clean the appropriate disks 12 | } 13 | -------------------------------------------------------------------------------- /test/cfg/default/packs/glances/services/load.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Load 3 | use glances-service 4 | register 0 5 | host_name glances 6 | check_command check_glances_load 7 | 8 | _DETAILLEDESC Detect abnormal CPU usage 9 | _IMPACT Slow down applications hosted by the system 10 | _FIXACTIONS If recurrent situation then make performance audit 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/glances/services/memory.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Memory 3 | use glances-service 4 | register 0 5 | host_name glances 6 | check_command check_glances_memory 7 | 8 | _DETAILLEDESC Check about memory and swap space usage. Too many use of swap space means lacks of memory or memory leaks. 9 | _IMPACT Average : More IO made and important slowed down applications performances. 10 | _FIXACTIONS Search memory processes consumers. Add more memory. 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/glances/services/net.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Net_$KEY$ 3 | use glances-service 4 | register 0 5 | host_name glances 6 | check_command check_glances_net!$KEY$ 7 | duplicate_foreach _IFACES 8 | 9 | _DETAILLEDESC Check bandwidth usage and network communications quality reporting errors and discarded packets. 10 | _IMPACT Average: Slowed down connectivity performance 11 | _FIXACTIONS Audit about network consumers processes and most likely wire quality and bad switches configuration. 12 | } 13 | -------------------------------------------------------------------------------- /test/cfg/default/packs/glances/services/swap.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Swap 3 | use glances-service 4 | register 0 5 | host_name glances 6 | check_command check_glances_swap 7 | 8 | _DETAILLEDESC 9 | _IMPACT 10 | _FIXACTIONS 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/glances/services/system.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description System 3 | use glances-service 4 | register 0 5 | host_name glances 6 | check_command get_glances_system 7 | 8 | _DETAILLEDESC Get remote system information (hostname, OS) 9 | _IMPACT None 10 | _FIXACTIONS None 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/glances/services/uptime.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Uptime 3 | use glances-service 4 | register 0 5 | host_name glances 6 | check_command check_glances_uptime 7 | 8 | _DETAILLEDESC 9 | _IMPACT 10 | _FIXACTIONS 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/glances/templates.cfg: -------------------------------------------------------------------------------- 1 | # The glances template. 2 | define host{ 3 | name glances 4 | use generic-host 5 | register 0 6 | 7 | # We will show the glances custom view 8 | custom_views +glances 9 | 10 | # Macros 11 | _UPTIME_WARN 900 12 | _UPTIME_CRIT 300 13 | _LOAD_WARN 2 14 | _LOAD_CRIT 3 15 | _CPU_WARN 80 16 | _CPU_CRIT 90 17 | _MEMORY_WARN 90 18 | _MEMORY_CRIT 95 19 | _FS /, /home 20 | _FS_WARN 90 21 | _FS_CRIT 95 22 | _IFACES eth0, eth1 23 | _NET_WARN 7500000 24 | _NET_CRIT 10000000 25 | } 26 | 27 | define service{ 28 | name glances-service 29 | use generic-service 30 | register 0 31 | aggregation system 32 | } 33 | -------------------------------------------------------------------------------- /test/cfg/default/packs/http/commands.cfg: -------------------------------------------------------------------------------- 1 | # Simple web check 2 | define command { 3 | command_name check_http 4 | command_line $NAGIOSPLUGINSDIR$/check_http -H $_HOSTCHECK_HTTP_DOMAIN_NAME$ -u $_HOSTCHECK_HTTP_URI$ -p $_HOSTCHECK_HTTP_PORT$ --authorization=$_HOSTCHECK_HTTP_AUTH$ 5 | } 6 | 7 | 8 | 9 | # And with SSL 10 | define command { 11 | command_name check_https 12 | command_line $NAGIOSPLUGINSDIR$/check_http -H $_HOSTCHECK_HTTPS_DOMAIN_NAME$ -S --sni -u $_HOSTCHECK_HTTPS_URI$ -p $_HOSTCHECK_HTTPS_PORT$ --authorization=$_HOSTCHECK_HTTPS_AUTH$ 13 | } 14 | 15 | 16 | # Look at a SSL certificate 17 | define command { 18 | command_name check_https_certificate 19 | command_line $NAGIOSPLUGINSDIR$/check_http -H $_HOSTCHECK_HTTPS_DOMAIN_NAME$ -C $_HOSTCHECK_HTTPS_MINIMUM_DAYS$ --sni -p $_HOSTCHECK_HTTPS_PORT$ --authorization=$_HOSTCHECK_HTTPS_AUTH$ 20 | } 21 | -------------------------------------------------------------------------------- /test/cfg/default/packs/http/discovery.cfg: -------------------------------------------------------------------------------- 1 | # The discovery rule for tagging http 2 | define discoveryrule { 3 | discoveryrule_name Http 4 | creation_type host 5 | openports ^80$ 6 | +use http 7 | } 8 | 9 | 10 | 11 | define discoveryrule { 12 | discoveryrule_name Https 13 | creation_type host 14 | openports ^443$ 15 | +use https 16 | } 17 | -------------------------------------------------------------------------------- /test/cfg/default/packs/http/services/certificate.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description HttpsCertificate 3 | use generic-service 4 | register 0 5 | host_name https 6 | check_command check_https_certificate 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/http/services/http.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Http 3 | use generic-service 4 | register 0 5 | host_name http 6 | check_command check_http 7 | servicegroups web 8 | } 9 | -------------------------------------------------------------------------------- /test/cfg/default/packs/http/services/https.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Https 3 | use web-service 4 | register 0 5 | host_name https 6 | check_command check_https 7 | servicegroups web 8 | } 9 | -------------------------------------------------------------------------------- /test/cfg/default/packs/http/templates.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | name http 3 | use generic-host 4 | register 0 5 | 6 | _CHECK_HTTP_DOMAIN_NAME $HOSTADDRESS$ 7 | _CHECK_HTTP_PORT 80 8 | _CHECK_HTTP_URI / 9 | _CHECK_HTTP_AUTH #login:password 10 | } 11 | 12 | 13 | 14 | 15 | define host{ 16 | name https 17 | use generic-host 18 | register 0 19 | 20 | _CHECK_HTTPS_DOMAIN_NAME $HOSTADDRESS$ 21 | _CHECK_HTTPS_PORT 443 22 | _CHECK_HTTPS_URI / 23 | _CHECK_HTTPS_AUTH #login:password 24 | _CHECK_HTTPS_MINIMUM_DAYS 30 25 | } 26 | 27 | 28 | define service { 29 | name web-service 30 | use generic-service 31 | register 0 32 | aggregation web 33 | servicegroups web 34 | } 35 | 36 | define servicegroup{ 37 | servicegroup_name web 38 | alias All http services 39 | } 40 | -------------------------------------------------------------------------------- /test/cfg/default/packs/kiosks/commands.cfg: -------------------------------------------------------------------------------- 1 | ########################################################### 2 | # Commands definition 3 | ########################################################### 4 | # Dummy command is defined for NSCA monitored services and for business rules services ... 5 | define command { 6 | command_name check_dummy 7 | command_line $NAGIOSPLUGINSDIR$/check_dummy $ARG1$ "$ARG2$" 8 | } 9 | define command { 10 | command_name check_nsca_host_alive 11 | command_line $NAGIOSPLUGINSDIR$/check_dummy 2 "Host is not alive ..." 12 | } 13 | define command { 14 | command_name check_nsca_cpu 15 | command_line $NAGIOSPLUGINSDIR$/check_dummy 2 "No CPU data received ..." 16 | } 17 | define command { 18 | command_name check_nsca_memory 19 | command_line $NAGIOSPLUGINSDIR$/check_dummy 2 "No Memory data received ..." 20 | } 21 | define command { 22 | command_name check_nsca_network 23 | command_line $NAGIOSPLUGINSDIR$/check_dummy 2 "No Network data received ..." 24 | } 25 | define command { 26 | command_name check_nsca_disk 27 | command_line $NAGIOSPLUGINSDIR$/check_dummy 2 "No Disk data received ..." 28 | } 29 | -------------------------------------------------------------------------------- /test/cfg/default/packs/kiosks/services.cfg: -------------------------------------------------------------------------------- 1 | # ============================================================ 2 | # NSCA checks 3 | # ============================================================ 4 | # ------------------------------------------------------------ 5 | # Kiosk PC 6 | # ------------------------------------------------------------ 7 | define service { 8 | service_description nsca_cpu 9 | name Cpu (nsca) 10 | 11 | check_command check_nsca_cpu 12 | 13 | register 0 14 | use nsca-service 15 | host_name nsca-host 16 | } 17 | define service { 18 | service_description nsca_memory 19 | name Memory (nsca) 20 | 21 | check_command check_nsca_memory 22 | 23 | register 0 24 | use nsca-service 25 | host_name nsca-host 26 | } 27 | define service { 28 | service_description nsca_disk 29 | name Disk (nsca) 30 | 31 | check_command check_nsca_disk 32 | 33 | register 0 34 | use nsca-service 35 | host_name nsca-host 36 | } 37 | define service { 38 | service_description nsca_network 39 | name Reseau (nsca) 40 | 41 | check_command check_nsca_network 42 | 43 | register 0 44 | use nsca-service 45 | host_name nsca-host 46 | } 47 | -------------------------------------------------------------------------------- /test/cfg/default/packs/kiosks/templates.cfg: -------------------------------------------------------------------------------- 1 | # NSCA Passively checked hosts/services templates. 2 | define host { 3 | name nsca-host 4 | use generic-host 5 | 6 | register 0 7 | 8 | hostgroups nsca 9 | 10 | # Checking part 11 | check_command check_nsca_host_alive 12 | max_check_attempts 1 13 | 14 | # Check every time 15 | active_checks_enabled 0 16 | passive_checks_enabled 1 17 | check_period 24x7 18 | 19 | # Checks must have been received within last 2 hours ... 20 | check_freshness 1 21 | freshness_threshold 1200 22 | } 23 | 24 | define service { 25 | name nsca-service 26 | use generic-service 27 | register 0 28 | aggregation system 29 | 30 | # Check every time 31 | active_checks_enabled 0 32 | passive_checks_enabled 1 33 | check_period 24x7 34 | 35 | # Checks must have been received within last 2 hours ... 36 | check_freshness 1 37 | freshness_threshold 1200 38 | } 39 | -------------------------------------------------------------------------------- /test/cfg/default/packs/linux-snmp/discovery.cfg: -------------------------------------------------------------------------------- 1 | #os is returned by the nmap discovery script 2 | define discoveryrule { 3 | discoveryrule_name Linux 4 | creation_type host 5 | os linux 6 | +use linux-snmp 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/linux-snmp/services/cpu.cfg: -------------------------------------------------------------------------------- 1 | define service { 2 | service_description Cpu 3 | use 20min_long,linux-service 4 | register 0 5 | host_name linux-snmp 6 | check_command check_linux_cpu 7 | 8 | _DETAILLEDESC Detect abnormal CPU usage 9 | _IMPACT Slow down applications hosted by the system 10 | _FIXACTIONS If recurrent situation then make performance audit 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/linux-snmp/services/disks.cfg: -------------------------------------------------------------------------------- 1 | define service { 2 | service_description Disks 3 | use 1hour_long,linux-service 4 | register 0 5 | host_name linux-snmp 6 | check_command check_linux_disks 7 | 8 | _DETAILLEDESC Overall disks usage 9 | _IMPACT Depends on disks, cause system instability 10 | _FIXACTIONS Clean the appropriate disks 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/linux-snmp/services/load.cfg: -------------------------------------------------------------------------------- 1 | define service { 2 | service_description Load 3 | use 20min_long,linux-service 4 | register 0 5 | host_name linux-snmp 6 | check_command check_linux_load 7 | 8 | _DETAILLEDESC Detect abnormal CPU usage 9 | _IMPACT Slow down applications hosted by the system 10 | _FIXACTIONS If recurrent situation then make performance audit 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/linux-snmp/services/logFiles.cfg_unused: -------------------------------------------------------------------------------- 1 | define service { 2 | service_description Log_File_Health 3 | use 10min_short,linux-service 4 | register 0 5 | host_name linux-snmp 6 | check_command check_linux_logfiles 7 | is_volatile 1 8 | 9 | _DETAILLEDESC Detect warning and critical pattern in syslog messages 10 | _IMPACT Average/Critical : Depends on message detected, cause system instability 11 | _FIXACTIONS Depends on message detected 12 | } 13 | -------------------------------------------------------------------------------- /test/cfg/default/packs/linux-snmp/services/memory.cfg: -------------------------------------------------------------------------------- 1 | define service { 2 | service_description Memory 3 | use 20min_medium,linux-service 4 | register 0 5 | host_name linux-snmp 6 | check_command check_linux_memory 7 | 8 | _DETAILLEDESC Check about memory and swap space usage. Too many use of swap space means lacks of memory or memory leaks. 9 | _IMPACT Average : More IO made and important slowed down applications performances. 10 | _FIXACTIONS Search memory processes consumers. Add more memory. 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/linux-snmp/services/network_usage.cfg: -------------------------------------------------------------------------------- 1 | define service { 2 | service_description NetworkUsage 3 | use 10min_long,linux-service 4 | register 0 5 | host_name linux-snmp 6 | check_command check_linux_network_usage 7 | 8 | _DETAILLEDESC Check bandwidth usage and network communications quality reporting errors and discarded packets. 9 | _IMPACT Average: Slowed down connectivity performance 10 | _FIXACTIONS Audit about network consumers processes and most likely wire quality and bad switches configuration. 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/linux-snmp/services/time.cfg_unused: -------------------------------------------------------------------------------- 1 | define service { 2 | service_description TimeSync 3 | use 12hours_short,linux-service 4 | register 0 5 | host_name linux-snmp 6 | check_command check_linux_time 7 | 8 | _DETAILLEDESC Compare system time with time where shinken operate. Both must be synchronized with a ntp source. 9 | _IMPACT Average: Log, database and all records on system with a wrong time. Timeperiod drift and false alerts at wrong time slots. 10 | _FIXACTIONS Synchronized systems with ntp. Set time to be slewed by ntpdate rather than stepped. 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/linux-snmp/templates.cfg: -------------------------------------------------------------------------------- 1 | # The LINUX template. 2 | define host { 3 | name linux-snmp 4 | use generic-host 5 | check_command check_ping 6 | register 0 7 | 8 | max_check_attempts 1 9 | check_interval 1 10 | retry_interval 2 11 | 12 | _GRAPHITE_PRE shinken.linux-snmp 13 | 14 | 15 | # We will show the linux custom view 16 | #custom_views +linux 17 | 18 | _SNMPCOMMUNITY $SNMPCOMMUNITYREAD$ 19 | _SNMP_MSG_MAX_SIZE 65535 20 | 21 | _LOAD_WARN 2,2,2 22 | _LOAD_CRIT 3,3,3 23 | _STORAGE_WARN 90 24 | _STORAGE_CRIT 95 25 | _CPU_WARN 80 26 | _CPU_CRIT 90 27 | _MEMORY_WARN 80 28 | _MEMORY_CRIT 95 29 | _NTP_WARN 0.128 30 | _NTP_CRIT 1 31 | _NET_IFACES eth\d+|em\d+ 32 | _NET_WARN 90,90,0,0,0,0 33 | _NET_CRIT 0,0,0,0,0,0 34 | 35 | _CHKLOG_CONF $PLUGINSDIR$/logFiles_linux.conf 36 | _STORAGE_PATH / 37 | } 38 | 39 | define service { 40 | name linux-service 41 | use generic-service 42 | register 0 43 | aggregation system 44 | servicegroups snmp 45 | } 46 | 47 | define servicegroup{ 48 | servicegroup_name snmp 49 | alias SNMP checked services 50 | } 51 | -------------------------------------------------------------------------------- /test/cfg/default/packs/readme.cfg: -------------------------------------------------------------------------------- 1 | #In this place you will find all your packs downloaded from shinken.iowebsite. 2 | # 3 | #you can freely adapt them to your own needs. 4 | 5 | -------------------------------------------------------------------------------- /test/cfg/default/packs/san-switch/commands.cfg: -------------------------------------------------------------------------------- 1 | # Command sample to monitor IBM DS SAN storage. 2 | 3 | define command { 4 | command_name check_san_switch_status 5 | command_line $PLUGINSDIR$/check_san_switch.pl -H $HOSTNAME$ -C $_HOSTSNMPCOMMUNITY$ -T status 6 | } 7 | 8 | define command { 9 | command_name check_san_switch_sensors 10 | command_line $PLUGINSDIR$/check_san_switch.pl -H $HOSTNAME$ -C $_HOSTSNMPCOMMUNITY$ 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/san-switch/discovery.cfg: -------------------------------------------------------------------------------- 1 | define command { 2 | command_name ibm_san_switch_discovery 3 | command_line $NAGIOSPLUGINSDIR$/check_http -H $HOSTNAME$ -s switchExplorer -f critical && echo "$HOSTNAME$::san_switch=1" 4 | } 5 | 6 | ## Switch SAN Discovery 7 | define discoveryrun { 8 | discoveryrun_name ibm_san_switch 9 | discoveryrun_command ibm_san_switch_discovery 10 | openports ^80$ 11 | } 12 | 13 | # Only one rule to detect ibm san switch for now 14 | # add new ones for any other switch that can be monitored 15 | # by snmp with fibrealliance MIB. 16 | define discoveryrule { 17 | discoveryrule_name ibm_san_switch 18 | creation_type host 19 | san_switch 1 20 | +use san_switch 21 | } 22 | 23 | -------------------------------------------------------------------------------- /test/cfg/default/packs/san-switch/services/san_switch_sensors.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description san_switch_sensors 3 | use 10min_long,generic-service 4 | register 0 5 | host_name san_switch 6 | check_command check_san_switch_sensors 7 | 8 | _DETAILLEDESC Checks temp, fan, power sensors using SNMP FibreAlliance MIB 9 | _IMPACT Average: Several component failures may damage the san switch 10 | _FIXACTIONS Replace the faulty components 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/san-switch/services/san_switch_status.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description san_switch_status 3 | use 30min_medium,generic-service 4 | register 0 5 | host_name san_switch 6 | check_command check_san_switch_status 7 | 8 | _DETAILLEDESC Checks overall san switch status using SNMP FibreAlliance MIB 9 | _IMPACT Critical: In a redondant architecture, more than 1 san switch down may disrupt san accessibility by servers 10 | _FIXACTIONS Replace the faulty san switch 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/san-switch/templates.cfg: -------------------------------------------------------------------------------- 1 | define host { 2 | name san_switch 3 | use generic-host 4 | check_command check_ping 5 | register 0 6 | 7 | _SNMPCOMMUNITY $SNMPCOMMUNITYREAD$ 8 | } 9 | -------------------------------------------------------------------------------- /test/cfg/default/packs/shinken2/arbiter2.pack: -------------------------------------------------------------------------------- 1 | { 2 | "name":"arbiter2", 3 | "description":"Check shinken 2.x daemon health.", 4 | "path":"shinken/", 5 | "macros":{ 6 | "_shinken_daemons": { 7 | "type":"list", 8 | "description": "list of daemon types to check (arbiter,poller,broker,scheduler,receiver,reactionner)" 9 | }, 10 | "_shinken_arbiters": { 11 | "type":"list", 12 | "description": "list of arbiters addresses to make multi arbiters check (allways take the master arbiter)" 13 | }, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/cfg/default/packs/shinken2/commands.cfg: -------------------------------------------------------------------------------- 1 | # check shinken daemons in a single arbiter setup 2 | define command{ 3 | command_name check_shinken2 4 | command_line $PLUGINSDIR$/check_shinken2.py -a $HOSTADDRESS$ -t $ARG1$ 5 | } 6 | 7 | # check shinken daemons in a single arbiter setup with tls 8 | define command{ 9 | command_name check_shinken2_tls 10 | command_line $PLUGINSDIR$/check_shinken2.py -a $HOSTADDRESS$ -t $ARG1$ --ssl --ca=/etc/shinken/certs/ca.pem --cert=/etc/shinken/certs/server.cert --key=/etc/shinken/certs/server.key 11 | } 12 | 13 | # check shinken daemons in a single arbiter setup 14 | define command{ 15 | command_name check_shinken2_multi 16 | command_line $PLUGINSDIR$/check_shinken2.py -a "$ARG2$" -t $ARG1$ 17 | } 18 | 19 | # check shinken daemons in a multi arbiter setup with tls 20 | define command{ 21 | command_name check_shinken2_tls_multi 22 | command_line $PLUGINSDIR$/check_shinken2.py -a "$ARG2$" -t $ARG1$ --ssl --ca=/etc/shinken/certs/ca.pem --cert=/etc/shinken/certs/server.cert --key=/etc/shinken/certs/server.key 23 | } -------------------------------------------------------------------------------- /test/cfg/default/packs/shinken2/services/services.cfg: -------------------------------------------------------------------------------- 1 | # check daemon in a single arbiter setup 2 | define service{ 3 | service_description Shinken2-$KEY$ 4 | use shinken2-service 5 | register 0 6 | host_name shinken2 7 | check_command check_shinken2!$KEY$ 8 | duplicate_foreach _shinken_daemons 9 | } 10 | 11 | # check daemon in a multi arbiter setup 12 | define service{ 13 | service_description Shinken2-multi-$KEY$ 14 | use shinken2-service 15 | register 0 16 | host_name shinken2-multi 17 | check_command check_shinken2_multi!$KEY$!$_HOSTSHINKEN_ARBITERS$ 18 | duplicate_foreach _shinken_daemons 19 | } 20 | 21 | # check daemon with tls in a single arbiter setup 22 | define service{ 23 | service_description Shinken2-tls-$KEY$ 24 | use shinken2-service 25 | register 0 26 | host_name shinken2-tls 27 | check_command check_shinken2_tls!$KEY$ 28 | duplicate_foreach _shinken_daemons 29 | } 30 | 31 | # check daemon with tls in a multi arbiter setup 32 | define service{ 33 | service_description Shinken2-multi-$KEY$ 34 | use shinken2-service 35 | register 0 36 | host_name shinken2-tls-multi 37 | check_command check_shinken2_multi!$KEY$!$_HOSTSHINKEN_ARBITERS$ 38 | duplicate_foreach _shinken_daemons 39 | } -------------------------------------------------------------------------------- /test/cfg/default/packs/shinken2/templates.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/test/cfg/default/packs/shinken2/templates.cfg -------------------------------------------------------------------------------- /test/cfg/default/packs/switch/discovery.cfg: -------------------------------------------------------------------------------- 1 | # Generic tags 2 | # Switch 3 | define discoveryrule { 4 | discoveryrule_name Switch 5 | creation_type host 6 | ostype switch 7 | +use switch 8 | } 9 | 10 | -------------------------------------------------------------------------------- /test/cfg/default/packs/switch/services/interface_errors.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description InterfaceErrors 3 | use generic-service 4 | register 0 5 | host_name switch 6 | check_command check_switch_interface_errors 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/switch/services/interface_status.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description InterfaceStatus 3 | use generic-service 4 | register 0 5 | host_name switch 6 | check_command check_switch_interface_status 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/switch/services/interface_usage.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description InterfaceUsage 3 | use generic-service 4 | register 0 5 | host_name switch 6 | check_command check_switch_interface_usage 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/switch/switch.pack: -------------------------------------------------------------------------------- 1 | { 2 | "name":"switch", 3 | 4 | "description":"Standard switch checks. Checks are done by check_nwc_health.", 5 | 6 | "path":"network/", 7 | 8 | "macros":{ 9 | "_SWITCH_CPU_LOAD_CRIT": {"type":"percent", 10 | "description":"Check the CPU load of the device" 11 | }, 12 | "_SWITCH_CPU_LOAD_WARN": {"type":"percent", 13 | "description":"Check the CPU load of the device" 14 | }, 15 | "_SWITCH_MEMORY_USAGE_CRIT": {"type":"percent", 16 | "description":"Check the memory usage of the device" 17 | }, 18 | "_SWITCH_MEMORY_USAGE_WARN": {"type":"percent", 19 | "description":"Check the memory usage of the device" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /test/cfg/default/packs/switch/templates.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | name switch 3 | use generic-host 4 | register 0 5 | 6 | hostgroups switches 7 | 8 | _SNMPCOMMUNITY $SNMPCOMMUNITYREAD$ 9 | 10 | _SWITCH_TIMEOUT 60 11 | 12 | _SWITCH_CPU_LOAD_CRIT 90 13 | _SWITCH_CPU_LOAD_WARN 80 14 | 15 | _SWITCH_MEMORY_USAGE_CRIT 90 16 | _SWITCH_MEMORY_USAGE_WARN 80 17 | 18 | } 19 | 20 | define service { 21 | use generic-service 22 | name switch-service 23 | register 0 24 | # Bug Shinken 25 | #host_name switch 26 | 27 | servicegroups switches 28 | 29 | aggregation switch 30 | } 31 | 32 | define service { 33 | use generic-service 34 | name switch-hardware-service 35 | register 0 36 | # Bug Shinken 37 | #host_name switch 38 | 39 | aggregation switch 40 | } 41 | 42 | define hostgroup { 43 | hostgroup_name switches 44 | alias Switches 45 | } 46 | 47 | 48 | define servicegroup { 49 | servicegroup_name switches 50 | alias Switches services 51 | } 52 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/cluster/commands.cfg: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------- 2 | # 3 | # VMware standard check 4 | # Need check_esx3.pl for working 5 | # 6 | # ----------------------------------------------------------------- 7 | 8 | 9 | 10 | ## Generic calls 11 | ##ARG1 and take cpu, io, net or mem 12 | define command{ 13 | command_name check_cluster_cpu 14 | command_line $PLUGINSDIR$/check_esx3.pl -D $_HOSTVCENTER$ -C "$HOSTALIAS$" -u $_HOSTVCENTER_LOGIN$ -p $_HOSTVCENTER_PASSWORD$ -s usage -c $_HOSTCLUSTER_CPU_CRIT$ -w $_HOSTCLUSTER_CPU_WARN$ -l cpu -i $_HOSTCLUSTER_INTERVAL$ -S $_HOSTVCENTER_SESSION$ 15 | } 16 | 17 | define command{ 18 | command_name check_cluster_issues 19 | command_line $PLUGINSDIR$/check_esx3.pl -D $_HOSTVCENTER$ -C "$HOSTALIAS$" -u $_HOSTVCENTER_LOGIN$ -p $_HOSTVCENTER_PASSWORD$ -l runtime -s issues -i $_HOSTCLUSTER_INTERVAL$ -S $_HOSTVCENTER_SESSION$ 20 | } 21 | 22 | define command{ 23 | command_name check_cluster_mem 24 | command_line $PLUGINSDIR$/check_esx3.pl -D $_HOSTVCENTER$ -C "$HOSTALIAS$" -u $_HOSTVCENTER_LOGIN$ -p $_HOSTVCENTER_PASSWORD$ -l mem -s usage -c $_HOSTCLUSTER_MEM_CRIT$ -w $_HOSTCLUSTER_MEM_WARN$ -i $_HOSTCLUSTER_INTERVAL$ -S $_HOSTVCENTER_SESSION$ 25 | } 26 | 27 | # Check host alive for vmware cluster 28 | define command{ 29 | command_name check_cluster_alive 30 | command_line $PLUGINSDIR$/check_esx3.pl -D $_HOSTVCENTER$ -C "$HOSTALIAS$" -u $_HOSTVCENTER_LOGIN$ -p $_HOSTVCENTER_PASSWORD$ -l runtime -s listhost -c $_HOSTCLUSTER_HOSTS_CRIT$ -w $_HOSTCLUSTER_HOSTS_WARN$ -S $_HOSTVCENTER_SESSION$ 31 | } 32 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/cluster/discovery.cfg: -------------------------------------------------------------------------------- 1 | ### Look for a VMWare Cluster 2 | ### Not supported yet 3 | 4 | #define discoveryrule { 5 | # discoveryrule_name ESX 6 | # creation_type host 7 | # isesxhost 1 8 | # +use esx 9 | #} 10 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/cluster/services/cpu.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Cpu_usage 3 | use vmware-service 4 | register 0 5 | host_name vmware-cluster 6 | check_command check_cluster_cpu 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/cluster/services/issues.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Cluster_configuration_issues 3 | use vmware-service 4 | register 0 5 | host_name vmware-cluster 6 | check_command check_cluster_issues 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/cluster/services/mem.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Memory_usage 3 | use vmware-service 4 | register 0 5 | host_name vmware-cluster 6 | check_command check_cluster_mem 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/cluster/templates.cfg: -------------------------------------------------------------------------------- 1 | # CLUSTER one 2 | define host{ 3 | name vmware-cluster 4 | use generic-host 5 | check_command check_cluster_alive 6 | register 0 7 | 8 | _VCENTER $VCENTER$ 9 | _VCENTER_LOGIN $VCENTERLOGIN$ 10 | _VCENTER_PASSWORD $VCENTERPASSWORD$ 11 | _VCENTER_SESSION $VCENTERSESSION$ 12 | 13 | _CLUSTER_CPU_CRIT 95 14 | _CLUSTER_CPU_WARN 90 15 | _CLUSTER_MEM_CRIT 95 16 | _CLUSTER_MEM_WARN 90 17 | _CLUSTER_HOSTS_CRIT 0 18 | _CLUSTER_HOSTS_WARN 0 19 | _CLUSTER_INTERVAL 300 20 | } 21 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/esx/commands.cfg: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------- 2 | # 3 | # VMware standard check 4 | # Need chck_esx3.pl for working 5 | # 6 | # ----------------------------------------------------------------- 7 | 8 | 9 | 10 | ## Generic calls 11 | ##ARG1 and take cpu, io, net or mem 12 | define command{ 13 | command_name check_esx_host 14 | command_line $PLUGINSDIR$/check_esx3.pl -D $_HOSTVCENTER$ -H "$HOSTALIAS$" -u $_HOSTVCENTER_LOGIN$ -p $_HOSTVCENTER_PASSWORD$ -l $ARG1$ -S $_HOSTVCENTER_SESSION$ 15 | } 16 | 17 | define command{ 18 | command_name check_esx_vm 19 | command_line $PLUGINSDIR$/check_esx3.pl -D $_HOSTVCENTER$ -N "$HOSTALIAS$" -u $_HOSTVCENTER_LOGIN$ -p $_HOSTVCENTER_PASSWORD$ -l $ARG1$ -S $_HOSTVCENTER_SESSION$ 20 | } 21 | 22 | 23 | define command{ 24 | command_name check_esx_host_cpu 25 | command_line $PLUGINSDIR$/check_esx3.pl -D $_HOSTVCENTER$ -H "$HOSTALIAS$" -u $_HOSTVCENTER_LOGIN$ -p $_HOSTVCENTER_PASSWORD$ -s usage -c $_HOSTESX_CPU_CRIT$ -w $_HOSTESX_CPU_WARN$ -l cpu -S $_HOSTVCENTER_SESSION$ 26 | } 27 | 28 | define command{ 29 | command_name check_esx_host_io 30 | command_line $PLUGINSDIR$/check_esx3.pl -D $_HOSTVCENTER$ -H "$HOSTALIAS$" -u $_HOSTVCENTER_LOGIN$ -p $_HOSTVCENTER_PASSWORD$ -l io -S $_HOSTVCENTER_SESSION$ 31 | } 32 | 33 | define command{ 34 | command_name check_esx_host_net 35 | command_line $PLUGINSDIR$/check_esx3.pl -D $_HOSTVCENTER$ -H "$HOSTALIAS$" -u $_HOSTVCENTER_LOGIN$ -p $_HOSTVCENTER_PASSWORD$ -l net -S $_HOSTVCENTER_SESSION$ 36 | } 37 | 38 | 39 | define command{ 40 | command_name check_esx_host_mem 41 | command_line $PLUGINSDIR$/check_esx3.pl -D $_HOSTVCENTER$ -H "$HOSTALIAS$" -u $_HOSTVCENTER_LOGIN$ -p $_HOSTVCENTER_PASSWORD$ -l mem -s usage -c $_HOSTESX_MEM_CRIT$ -w $_HOSTESX_MEM_WARN$ -S $_HOSTVCENTER_SESSION$ 42 | } 43 | 44 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/esx/discovery.cfg: -------------------------------------------------------------------------------- 1 | ### Look for a VMWare Host 2 | define discoveryrule { 3 | discoveryrule_name ESX 4 | creation_type host 5 | isesxhost 1 6 | +use esx 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/esx/services/cpu.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Cpu 3 | use vmware-service 4 | register 0 5 | host_name esx 6 | check_command check_esx_host_cpu 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/esx/services/io.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Io 3 | use vmware-service 4 | register 0 5 | host_name esx 6 | check_command check_esx_host_io 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/esx/services/mem.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Memory 3 | use vmware-service 4 | register 0 5 | host_name esx 6 | check_command check_esx_host_mem 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/esx/services/net.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Net 3 | use vmware-service 4 | register 0 5 | host_name esx 6 | check_command check_esx_host_net 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/esx/templates.cfg: -------------------------------------------------------------------------------- 1 | # ESX one 2 | define host{ 3 | name esx 4 | use generic-host 5 | register 0 6 | 7 | _VCENTER $VCENTER$ 8 | _VCENTER_LOGIN $VCENTERLOGIN$ 9 | _VCENTER_PASSWORD $VCENTERPASSWORD$ 10 | _VCENTER_SESSION $VCENTERSESSION$ 11 | 12 | _ESX_CPU_CRIT 95 13 | _ESX_CPU_WARN 90 14 | _ESX_MEM_CRIT 95 15 | _ESX_MEM_WARN 90 16 | 17 | } 18 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/templates.cfg: -------------------------------------------------------------------------------- 1 | 2 | define service{ 3 | name vmware-service 4 | use generic-service 5 | aggregation vmware 6 | register 0 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/vcenter/commands.cfg: -------------------------------------------------------------------------------- 1 | # Check Datastores Usage 2 | define command{ 3 | command_name check_esx_vcenter_vmfs 4 | command_line $PLUGINSDIR$/check_esx3.pl -D $_HOSTVCENTER$ -u $_HOSTVCENTER_LOGIN$ -p $_HOSTVCENTER_PASSWORD$ -l vmfs -o used,brief -w $_HOSTVMFS_WARN$ -c $_HOSTVMFS_CRIT$ -S $_HOSTVCENTER_SESSION$ -x $_HOSTVMFS_EXCL$ 5 | } 6 | 7 | # Check Snapshots count 8 | define command{ 9 | command_name check_vmware_snapshots_count 10 | command_line $PLUGINSDIR$/check_vmware_snapshots.pl --server $_HOSTVCENTER$ --username $_HOSTVCENTER_LOGIN$ --password $_HOSTVCENTER_PASSWORD$ --mode count --warning $_HOSTSNAPCOUNT_WARN$ --critical $_HOSTSNAPCOUNT_CRIT$ --sessionfile $_HOSTVCENTER_SESSION$ 11 | } 12 | 13 | # Check Snapshots age 14 | define command{ 15 | command_name check_vmware_snapshots_age 16 | command_line $PLUGINSDIR$/check_vmware_snapshots.pl --server $_HOSTVCENTER$ --username $_HOSTVCENTER_LOGIN$ --password $_HOSTVCENTER_PASSWORD$ --mode age --warning $_HOSTSNAPAGE_WARN$ --critical $_HOSTSNAPAGE_CRIT$ --sessionfile $_HOSTVCENTER_SESSION$ 17 | } 18 | 19 | # Check Tools of every VM 20 | define command{ 21 | command_name check_vmware_tools 22 | command_line $PLUGINSDIR$/check_esx3.pl -D $_HOSTVCENTER$ -u $_HOSTVCENTER_LOGIN$ -p $_HOSTVCENTER_PASSWORD$ -l runtime -s tools -w $_HOSTVMTOOLS_WARN$ -c $_HOSTVMTOOLS_CRIT$ -x $_HOSTVMTOOLS_EXCL$ -S $_HOSTVCENTER_SESSION$ 23 | } 24 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/vcenter/discovery.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/test/cfg/default/packs/vmware/vcenter/discovery.cfg -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/vcenter/services/snapshots_age.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Snapshots Age 3 | use vmware-service 4 | register 0 5 | host_name vmware-vcenter 6 | check_command check_vmware_snapshots_age 7 | } 8 | 9 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/vcenter/services/snapshots_count.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Snapshots Count 3 | use vmware-service 4 | register 0 5 | host_name vmware-vcenter 6 | check_command check_vmware_snapshots_count 7 | } 8 | 9 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/vcenter/services/tools.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description VM Tools 3 | use vmware-service 4 | register 0 5 | host_name vmware-vcenter 6 | check_command check_vmware_tools 7 | business_impact 1 8 | } 9 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/vcenter/services/vmfs.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Datastores Usage 3 | use vmware-service 4 | register 0 5 | host_name vmware-vcenter 6 | check_command check_esx_vcenter_vmfs 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/vcenter/templates.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | name vmware-vcenter 3 | use generic-host 4 | register 0 5 | _VCENTER $VCENTER$ 6 | _VCENTER_LOGIN $VCENTERLOGIN$ 7 | _VCENTER_PASSWORD $VCENTERPASSWORD$ 8 | _VCENTER_SESSION $VCENTERSESSION$ 9 | 10 | _VMFS_CRIT 95% 11 | _VMFS_WARN 90% 12 | _VMFS_EXCL "" 13 | 14 | _SNAPCOUNT_WARN 1 15 | _SNAPCOUNT_CRIT 2 16 | _SNAPAGE_WARN 7 17 | _SNAPAGE_CRIT 30 18 | 19 | # Using Thresholds : below means no alert at all 20 | _VMTOOLS_WARN 100 21 | _VMTOOLS_CRIT 100 22 | _VMTOOLS_EXCL "" 23 | 24 | } 25 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/vm/discovery.cfg: -------------------------------------------------------------------------------- 1 | #### And now look for VMware machines 2 | 3 | define discoveryrule { 4 | discoveryrule_name VMware-VM 5 | creation_type host 6 | isesxvm 1 7 | +use vmware-vm 8 | } 9 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/vm/services/cpu.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Cpu 3 | use vmware-service 4 | register 0 5 | host_name vmware-vm 6 | check_command check_esx_vm_cpu 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/vm/services/disk.cfg: -------------------------------------------------------------------------------- 1 | # Needs Running Vm Tools on VM to work 2 | define service{ 3 | service_description Disks 4 | use vmware-service 5 | register 0 6 | host_name vmware-vm 7 | check_command check_esx_vm_disk 8 | } 9 | 10 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/vm/services/io.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Io 3 | use vmware-service 4 | register 0 5 | host_name vmware-vm 6 | check_command check_esx_vm_io_all 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/vm/services/mem.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Mem 3 | use vmware-service 4 | register 0 5 | host_name vmware-vm 6 | check_command check_esx_vm_mem 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/vm/services/net.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Net 3 | use vmware-service 4 | register 0 5 | host_name vmware-vm 6 | check_command check_esx_vm_net_all 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/vm/templates.cfg: -------------------------------------------------------------------------------- 1 | # VM template 2 | define host{ 3 | name vmware-vm 4 | use generic-host 5 | register 0 6 | _VCENTER $VCENTER$ 7 | _VCENTER_LOGIN $VCENTERLOGIN$ 8 | _VCENTER_PASSWORD $VCENTERPASSWORD$ 9 | _VCENTER_SESSION $VCENTERSESSION$ 10 | 11 | _VM_CPU_CRIT 95 12 | _VM_CPU_WARN 90 13 | _VM_MEM_CRIT 95 14 | _VM_MEM_WARN 90 15 | _VM_DISK_CRIT 95 16 | _VM_DISK_WARN 90 17 | _VM_DISK_EXCL "" 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/windows-vcenter/commands.cfg: -------------------------------------------------------------------------------- 1 | # Check vCenter Windows Services 2 | define command { 3 | command_name check_vcenter_service 4 | command_line $PLUGINSDIR$/check_wmi_plus.pl -H $HOSTADDRESS$ -u "$_HOSTDOMAINUSER$" -p "$_HOSTDOMAINPASSWORD$" -m checkservice -a $ARG1$ -w 0 -c 0 --inidir=$PLUGINSDIR$ 5 | } 6 | 7 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/windows-vcenter/discovery.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/test/cfg/default/packs/vmware/windows-vcenter/discovery.cfg -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/windows-vcenter/services/vcservices.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description VC Service $KEY$ 3 | use vmware-service 4 | register 0 5 | host_name windows-vcenter 6 | check_command check_vcenter_service!$KEY$ 7 | business_impact 3 8 | 9 | duplicate_foreach _vcservices 10 | } 11 | 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/vmware/windows-vcenter/templates.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | name windows-vcenter 3 | use generic-host 4 | register 0 5 | 6 | _DOMAINUSER $DOMAINUSER$ 7 | _DOMAINPASSWORD $DOMAINPASSWORD$ 8 | 9 | _vcservices vctomcat,vpxd 10 | 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/big_processes.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description BigProcesses 3 | use windows-service 4 | register 0 5 | host_name windows 6 | check_command check_windows_big_processes 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/cpu.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Cpu 3 | use windows-service 4 | register 0 5 | host_name windows 6 | check_command check_windows_overall_cpu 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/disks.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Disks 3 | use windows-service 4 | register 0 5 | host_name windows 6 | check_command check_windows_disks 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/disks_io.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description DisksIO 3 | use windows-service 4 | register 0 5 | host_name windows 6 | check_command check_windows_disks_io 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/each_cpu.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description EachCpu 3 | use windows-service 4 | register 0 5 | host_name windows 6 | check_command check_windows_each_cpu 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/eventlogs_applications.cfg_unused: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description EventLogApplication 3 | use windows-service 4 | register 0 5 | host_name windows 6 | check_command check_windows_eventlogs!application 7 | aggregation system/eventlogs 8 | } 9 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/eventlogs_system.cfg_unused: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description EventLogSystem 3 | use windows-service 4 | register 0 5 | host_name windows 6 | check_command check_windows_eventlogs!system 7 | aggregation system/eventlogs 8 | } 9 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/inactive_sessions.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description InactiveSessions 3 | use windows-service 4 | register 0 5 | host_name windows 6 | check_command check_windows_inactive_ts_sessions 7 | 8 | } 9 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/load_average.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description LoadAverage 3 | use windows-service 4 | register 0 5 | host_name windows 6 | check_command check_windows_loadaverage 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/network_interface.cfg: -------------------------------------------------------------------------------- 1 | #Test & Infos sur une carte réseau 2 | #Check network interface 3 | #Add by @Thibautg16 le 17/05/2013 4 | #Maj 5 | define service { 6 | service_description Network Interface 7 | use windows-service 8 | register 0 9 | host_name windows 10 | check_command check_windows_network 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/physical_memory.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Memory 3 | use windows-service 4 | register 0 5 | host_name windows 6 | check_command check_windows_physical_memory 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/reboot.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Reboot 3 | use windows-service 4 | register 0 5 | host_name windows 6 | check_command check_windows_reboot 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/services.cfg: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Services 3 | use windows-service 4 | register 0 5 | host_name windows 6 | check_command check_windows_auto_services 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/share_space.cfg: -------------------------------------------------------------------------------- 1 | # This will create a check for all _shares of your windows box 2 | define service{ 3 | service_description ShareSpace-$KEY$ 4 | use windows-service 5 | register 0 6 | host_name windows 7 | check_command check_windows_share!$KEY$ 8 | duplicate_foreach _shares 9 | aggregation windows/shares 10 | } 11 | -------------------------------------------------------------------------------- /test/cfg/default/packs/windows/services/swap.cfg_unused: -------------------------------------------------------------------------------- 1 | define service{ 2 | service_description Swap 3 | use windows-service 4 | register 0 5 | host_name windows 6 | check_command check_windows_swap 7 | } 8 | -------------------------------------------------------------------------------- /test/cfg/default/reactionners/reactionner-android-sms.cfg: -------------------------------------------------------------------------------- 1 | #=============================================================================== 2 | # REACTIONNER 3 | # Sample of an Android SMS reactionner 4 | # Uncomment this reactionner to enable it 5 | #=============================================================================== 6 | # 2 requirements: 7 | # - "modules AndroidSMS" = in order to load SMS sending code 8 | # - "reactionner_tags android_sms" = so ONLY commands with this tag will be 9 | # sent to this reactionner, not mail things. 10 | #=============================================================================== 11 | #define reactionner { 12 | # reactionner_name reactionner-Android 13 | # address WIFI-IP-OF-YOUR-ANDROID-PHONE 14 | # port 7769 15 | # spare 0 16 | # ## Optional 17 | # manage_sub_realms 0 ; Does it take jobs from schedulers of sub-Realms? 18 | # min_workers 1 ; Starts with N processes (0 = 1 per CPU) 19 | # max_workers 15 ; No more than N processes (0 = 1 per CPU) 20 | # polling_interval 1 ; Get jobs from schedulers each 1 second 21 | # timeout 3 ; Ping timeout 22 | # data_timeout 120 ; Data send timeout 23 | # max_check_attempts 3 ; If ping fails N or more, then the node is dead 24 | # check_interval 60 ; Ping node every N seconds 25 | # ## Modules 26 | # modules android-sms 27 | # reactionner_tags android_sms 28 | # ## Advanced Feature 29 | # realm All 30 | #} 31 | -------------------------------------------------------------------------------- /test/cfg/default/reactionners/reactionner-master.cfg: -------------------------------------------------------------------------------- 1 | #=============================================================================== 2 | # REACTIONNER (S1_Reactionner) 3 | #=============================================================================== 4 | # Description: The reactionner is responsible for: 5 | # - Executing notification actions 6 | # - Executing event handler actions 7 | # https://shinken.readthedocs.org/en/latest/08_configobjects/reactionner.html 8 | #=============================================================================== 9 | define reactionner { 10 | reactionner_name reactionner-master 11 | address localhost 12 | port 7769 13 | spare 0 14 | 15 | ## Optionnal 16 | manage_sub_realms 0 ; Does it take jobs from schedulers of sub-Realms? 17 | min_workers 1 ; Starts with N processes (0 = 1 per CPU) 18 | max_workers 15 ; No more than N processes (0 = 1 per CPU) 19 | polling_interval 1 ; Get jobs from schedulers each 1 second 20 | timeout 3 ; Ping timeout 21 | data_timeout 120 ; Data send timeout 22 | max_check_attempts 3 ; If ping fails N or more, then the node is dead 23 | check_interval 60 ; Ping node every N seconds 24 | 25 | ## Modules 26 | modules 27 | 28 | # Reactionner tags are the tag that the reactionner will manage. Use None as tag name to manage 29 | # untagged notification/event handlers 30 | #reactionner_tags None 31 | 32 | # Enable https or not 33 | use_ssl 0 34 | # enable certificate/hostname check, will avoid man in the middle attacks 35 | hard_ssl_name_check 0 36 | 37 | ## Advanced 38 | realm All 39 | } 40 | -------------------------------------------------------------------------------- /test/cfg/default/realms/all.cfg: -------------------------------------------------------------------------------- 1 | # Very advanced feature for multisite management. 2 | # Read the docs VERY CAREFULLY before changing these settings :) 3 | define realm { 4 | realm_name All 5 | default 1 6 | } 7 | -------------------------------------------------------------------------------- /test/cfg/default/receivers/receiver-master.cfg: -------------------------------------------------------------------------------- 1 | #=============================================================================== 2 | # RECEIVER 3 | #=============================================================================== 4 | # The receiver manages passive information. It's just a "buffer" which will 5 | # load passive modules (like NSCA) and be read by the arbiter to dispatch data. 6 | #=============================================================================== 7 | define receiver { 8 | receiver_name receiver-master 9 | address localhost 10 | port 7773 11 | spare 0 12 | 13 | ## Optional parameters 14 | timeout 3 ; Ping timeout 15 | data_timeout 120 ; Data send timeout 16 | max_check_attempts 3 ; If ping fails N or more, then the node is dead 17 | check_interval 60 ; Ping node every N seconds 18 | 19 | ## Modules for Receiver 20 | # - named-pipe = Open the named pipe nagios.cmd 21 | # - nsca = NSCA server 22 | # - tsca = TSCA server 23 | # - ws-arbiter = WebService for pushing results to the arbiter 24 | # - collectd = Receive collectd perfdata 25 | modules 26 | 27 | # Enable https or not 28 | use_ssl 0 29 | # enable certificate/hostname check, will avoid man in the middle attacks 30 | hard_ssl_name_check 0 31 | 32 | ## Advanced Feature 33 | direct_routing 0 ; If enabled, it will directly send commands to the 34 | ; schedulers if it knows about the hostname in the 35 | ; command. 36 | realm All 37 | } 38 | -------------------------------------------------------------------------------- /test/cfg/default/resource.d/active-directory.cfg: -------------------------------------------------------------------------------- 1 | # Active Directory and LDAP 2 | $DOMAIN$=MYDOMAIN 3 | $DOMAINUSERSHORT$=shinken_user 4 | $DOMAINUSER$=$DOMAIN$\\$DOMAINUSERSHORT$ 5 | $DOMAINPASSWORD$=superpassword 6 | $LDAPBASE$=dc=eu,dc=society,dc=com 7 | -------------------------------------------------------------------------------- /test/cfg/default/resource.d/nmap.cfg: -------------------------------------------------------------------------------- 1 | # what to discover by default 2 | $NMAPTARGETS$=www.google.fr www.bing.com 3 | # If your scans are too slow, try to increase minrate (number of packet in parallel 4 | # and reduce the number of retries. 5 | $NMAPMINRATE$=1000 6 | $NMAPMAXRETRIES$=3 7 | -------------------------------------------------------------------------------- /test/cfg/default/resource.d/paths.cfg: -------------------------------------------------------------------------------- 1 | # Nagios legacy macros 2 | $USER1$=$NAGIOSPLUGINSDIR$ 3 | $NAGIOSPLUGINSDIR$=/usr/lib/nagios/plugins 4 | 5 | #-- Location of the plugins for Shinken 6 | $PLUGINSDIR$=/var/lib/shinken/libexec 7 | 8 | -------------------------------------------------------------------------------- /test/cfg/default/resource.d/snmp.cfg: -------------------------------------------------------------------------------- 1 | # default snmp community 2 | $SNMPCOMMUNITYREAD$=public 3 | 4 | -------------------------------------------------------------------------------- /test/cfg/default/resource.d/vmware.cfg: -------------------------------------------------------------------------------- 1 | #### vSphere (ESX) part 2 | $VCENTER$=vcenter.mydomain.com 3 | $VCENTERLOGIN$=someuser 4 | $VCENTERPASSWORD$=somepassowrd 5 | $VCENTERSESSION$=/tmp/vcenter.session 6 | -------------------------------------------------------------------------------- /test/cfg/default/resource.d/wmi.cfg: -------------------------------------------------------------------------------- 1 | 2 | #-- WMI Plugin configuration 3 | $WMI_INI_DIR$=$PLUGINSDIR$/check_wmi_plus.d 4 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hostgroups.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/test/cfg/default/sample/hostgroups.cfg -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/br-erp.cfg: -------------------------------------------------------------------------------- 1 | # Sample correlation rule 2 | define host{ 3 | use generic-host 4 | host_name ERP 5 | # check_command bp_rule!srv-mysql,Mysql-connection&srv-webserver, Https & srv-webserver, HttpsCertificate 6 | 7 | # VERY huge business impact for this item! 8 | business_impact 5 9 | check_interval 1 10 | } 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-collectd.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | use collectd,generic-host 3 | host_name srx-collectdnode 4 | _disks dm-0,dm-1,sda1,sda2,sda5 5 | 6 | 7 | } 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-emc-clariion.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a EMC Clariion host 2 | define host{ 3 | use emc-clariion,generic-host 4 | host_name srv-emc-clariion 5 | address srv-emc-clariion.mydomain.com 6 | 7 | # The EMC check will need a valid login on navisphere. you can configure the crendential used 8 | # in the file etc/packs/storage/emc/macros.cfg 9 | 10 | # Look in etc/packs/storage/emc/templates.cfg for all available 11 | # macros 12 | 13 | } 14 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-esx.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a VmWare ESX host. 2 | define host{ 3 | use esx,generic-host 4 | host_name srv-esx 5 | address srv-esx.mydomain.com 6 | 7 | # The esx check will need good credentials in read to your vSphere server. 8 | # Look at the file /etc/packs/virtualization/vmware/macros.cfg for 9 | # setting the server address and the credentials 10 | 11 | # Look in etc/packs/virtualization/vmware/esx/templates for all available 12 | # macros for esx hosts 13 | 14 | } 15 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-exchange-cas.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a Microsoft CAS exchange server 2 | define host{ 3 | use exchange-cas,windows,generic-host 4 | host_name srv-exchange-cas 5 | address srv-exchange-cas.mydomain.com 6 | 7 | # The Exchange check will need a valid login on this host. you can configure the crendential used 8 | # in the file etc/resource.cfg 9 | 10 | # Look in etc/packs/microsoft/excgange/exchange-cas/templates.cfg for all available 11 | # macros 12 | 13 | } 14 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-exchange-ht.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a Microsoft Hub Transport exchange server 2 | define host{ 3 | use exchange-ht,windows,generic-host 4 | host_name srv-exchange-ht 5 | address srv-exchange-ht.mydomain.com 6 | 7 | # The Exchange check will need a valid login on this host. you can configure the crendential used 8 | # in the file etc/resource.cfg 9 | 10 | # Look in etc/packs/microsoft/excgange/exchange-ht/templates.cfg for all available 11 | # macros 12 | 13 | } 14 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-exchange-mb.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a Microsoft Mailbox exchange server 2 | define host{ 3 | use exchange-mb,windows,generic-host 4 | host_name srv-exchange-mb 5 | address srv-exchange-mb.mydomain.com 6 | 7 | # The Exchange check will need a valid login on this host. you can configure the crendential used 8 | # in the file etc/resource.cfg 9 | 10 | # Look in etc/packs/microsoft/excgange/exchange-mb/templates.cfg for all available 11 | # macros 12 | 13 | } 14 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-exchange-um.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a Microsoft UM exchange server 2 | define host{ 3 | use exchange-um,windows,generic-host 4 | host_name srv-exchange-um 5 | address srv-exchange-um.mydomain.com 6 | 7 | # The Exchange check will need a valid login on this host. you can configure the crendential used 8 | # in the file etc/resource.cfg 9 | 10 | # Look in etc/packs/microsoft/excgange/exchange-um/templates.cfg for all available 11 | # macros 12 | 13 | } 14 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-iis.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a Microsoft IIS server 2 | define host{ 3 | use iis,windows,generic-host 4 | host_name srv-iis 5 | address srv-iis.mydomain.com 6 | 7 | # The Windows check will need a valid login on this host. you can configure the crendential used 8 | # in the file etc/resource.cfg 9 | 10 | # Look in etc/packs/microsoft/iis/templates.cfg for all available 11 | # macros 12 | 13 | } 14 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-linux.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a standard linux host 2 | define host{ 3 | use linux,generic-host 4 | host_name srv-linux 5 | address srv-linux.mydomain.com 6 | 7 | # The Linux check will need a valid snmp community. You can configure it 8 | # in the file etc/resources.cfg 9 | 10 | # If you need specific credentials for this host, uncomment it 11 | #_SNMPCOMMUNITY linux-community 12 | 13 | 14 | # Look in etc/packs/os/linux/templates.cfg for all available 15 | # macros 16 | 17 | } 18 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-microsoft-dc.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a Microsoft domain controler 2 | define host{ 3 | use dc,windows,generic-host 4 | host_name srv-microsoft-dc 5 | address srv-microsoft-dc.mydomain.com 6 | 7 | # The DC check will need a valid login on this host. you can configure the crendential used 8 | # in the file etc/resource.cfg 9 | 10 | # Look in etc/packs/microsoft/dc/templates.cfg for all available 11 | # macros 12 | 13 | } 14 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-mongodb.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a mongodb server running under linux, 2 | define host{ 3 | use mongodb,linux,generic-host 4 | host_name srv-mongodb 5 | address srv-mongodb.mydomain.com 6 | 7 | # Look in etc/packs/databases/mongodb/templates.cfg for all available 8 | # macros for mongodb hosts 9 | 10 | } 11 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-mysql.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a mysql server running under linux. 2 | define host{ 3 | use mysql,linux,generic-host 4 | host_name srv-mysql 5 | address srv-mysql.mydomain.com 6 | 7 | # Uncomment the below macros if the mysql credentials are 8 | # not the global ones (in etc/resource.cfg) 9 | 10 | #_MYSQLUSER myuser 11 | #_MYSQLPASSWORD mypassword 12 | 13 | # Look in etc/packs/databases/mysql/templates.cfg for all available 14 | # macros 15 | 16 | } 17 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-netapp.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a NetApp host 2 | define host{ 3 | use netapp,generic-host 4 | host_name srv-netapp 5 | address srv-netapp.mydomain.com 6 | 7 | # The NetApp check will need a valid snmp community. You can configure it 8 | # in the file etc/resources.cfg 9 | 10 | # If you need a specific snmp commuity for this host, uncomment the line 11 | # _SNMPCOMMUNITY netapp-community 12 | 13 | 14 | # Look in etc/packs/storage/emc/templates.cfg for all available 15 | # macros 16 | 17 | } 18 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-newyork.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | use linux,generic-host 3 | host_name srv-newyork 4 | address srv-newyork.mymonitoringbox.com 5 | 6 | # New York coordonates, from http://www.thegpscoordinates.com/new-york/new-york-city/ 7 | _LAT 40.71448 8 | _LONG -74.00598 9 | } 10 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-oracle.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a oracle server running under linux, 2 | # with two databases instances : TESTING and PRODUCTION 3 | define host{ 4 | use oracle,linux,generic-host 5 | host_name srv-oracle 6 | address srv-oracle.mydomain.com 7 | 8 | # Change the below macro for putting your real SID names 9 | #_databases TESTING,PRODUCTION 10 | 11 | # you can change database credentials in the file etc/packs/databases/oracle/macros.cfg 12 | 13 | # Look in etc/packs/databases/oracle/templates.cfg for all available 14 | # macros for oracle hosts 15 | 16 | } 17 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-postgresql.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a postgresql server running under linux, 2 | define host{ 3 | use postgresql,linux,generic-host 4 | host_name srv-postgresql 5 | address srv-postgresql.mydomain.com 6 | 7 | # Global postgresql credentials are available in the file /etc/packs/databases/postgresql/macros.cfg 8 | # Uncomment the macros for specific credentials for this host. 9 | #_POSTGRESQLUSER myuser 10 | #_POSTGRESQLPASSWORD mypassword 11 | 12 | 13 | # Look in etc/packs/databases/postgresql/templates.cfg for all available 14 | # macros for postgresql hosts 15 | 16 | } 17 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-vmware-vm.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a VmWare VM host. 2 | define host{ 3 | use vmware-vm,generic-host 4 | host_name srv-vmware-vm 5 | address srv-vmware-vm.mydomain.com 6 | 7 | # The VM check will need good credentials in read to your vSphere server. 8 | # Look at the file /etc/packs/virtualization/vmware/macros.cfg for 9 | # setting the server address and the credentials 10 | 11 | # Look in etc/packs/virtualization/vmware/vm/templates for all available 12 | # macros for vm hosts 13 | 14 | } 15 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-web-avg.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | use generic-host 3 | contact_groups admins 4 | host_name srv-web-avg 5 | alias srv-web-avg 6 | address localhost 7 | check_interval 1 8 | 9 | } 10 | 11 | 12 | define service{ 13 | use generic-service 14 | host_name srv-web-avg 15 | service_description HttpAverage 16 | check_command check_dummy!0 17 | check_interval 1 18 | # compute the value from srv-web-1->3 / Http time value 19 | # trigger_name avg_http 20 | } 21 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-webserver.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | use http,https,linux,generic-host 3 | host_name srv-webserver 4 | 5 | 6 | # Uncomment the below maros to use specific port or URI to check 7 | #_CHECK_HTTP_PORT 80 8 | #_CHECK_HTTP_URI / 9 | 10 | #_CHECK_HTTPS_PORT 443 11 | #_CHECK_HTTPS_URI / 12 | 13 | } 14 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/srv-windows.cfg: -------------------------------------------------------------------------------- 1 | # This is a sample host for a standard windows host 2 | define host{ 3 | use windows,generic-host 4 | host_name srv-windows 5 | address srv-windows.mydomain.com 6 | 7 | # The Windows check will need valid domain credential. You can configure it 8 | # in the file etc/resources.cfg 9 | 10 | # If you need specific credentials for this host, uncomment it 11 | #_DOMAIN MYDOMAIN 12 | #_DOMAINUSERSHORT itmanager 13 | # this double \\ is NOT a typo 14 | #_DOMAINUSER MYDOMAIN\\itmanager 15 | #_DOMAINPASSWORD SUPERPASSWORD 16 | 17 | 18 | # Look in etc/packs/os/windows/templates.cfg for all available 19 | # macros 20 | 21 | } 22 | -------------------------------------------------------------------------------- /test/cfg/default/sample/hosts/switch-cisco.cfg: -------------------------------------------------------------------------------- 1 | define host{ 2 | use cisco,generic-host 3 | host_name switch-cisco 4 | address switch-cisco.mydomain.com 5 | 6 | # Check all 10 ports of this switch 7 | _ports Port [1-10] 8 | } 9 | -------------------------------------------------------------------------------- /test/cfg/default/sample/services/eue_glpi.cfg: -------------------------------------------------------------------------------- 1 | # sample check for application monitoring this enable the feature test of glpi dem 2 | define service{ 3 | service_description Application GLPI authentification 4 | use local-service ; Name of service template to use 5 | host_name localhost 6 | check_command check_eue!glpi 7 | 8 | register 0 9 | } 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/cfg/default/sample/triggers.d/avg_http.trig: -------------------------------------------------------------------------------- 1 | print "TRIG: I am a trigger in the element", self.get_full_name() 2 | names = ['srv-web-%d/Http' %i for i in range(1, 4)] 3 | srvs = [get_object(name) for name in names] 4 | 5 | print "TRIG: Got http services", srvs 6 | perfs = [perf(srv, 'time') for srv in srvs] 7 | print "TRIG: Got perfs", perfs 8 | value = sum(perfs, 0.0)/len(perfs) 9 | print "TRIG: and got the average value", value 10 | 11 | print "Now saving data" 12 | self.output = 'Trigger launch OK' 13 | self.perf_data = 'HttpAverage=%.3f' % value -------------------------------------------------------------------------------- /test/cfg/default/servicegroups/sample.cfg: -------------------------------------------------------------------------------- 1 | 2 | # Service groups are less important than hosts group, but can be useful 3 | 4 | #define servicegroup{ 5 | # servicegroup_name LocalServices 6 | # alias Local service 7 | # members localhost,Root Partition 8 | # } 9 | 10 | #define servicegroup{ 11 | # servicegroup_name WebService 12 | # alias All http service 13 | # members srv-web-1,Http 14 | # } 15 | 16 | -------------------------------------------------------------------------------- /test/cfg/default/servicegroups/test.cfg: -------------------------------------------------------------------------------- 1 | define servicegroup{ 2 | servicegroup_name dev 3 | alias dev services group 4 | # Contains some other groups 5 | servicegroup_members dev_child, web 6 | } 7 | define servicegroup{ 8 | servicegroup_name dev_child 9 | alias dev child services group 10 | # Contains services list (host1,service1,host2,service2, ...) 11 | members KNM-Glpi,Https,KNM-Shinken,Https 12 | } -------------------------------------------------------------------------------- /test/cfg/default/services/services.cfg: -------------------------------------------------------------------------------- 1 | ## In this directory you can put all your specific service 2 | # definitions -------------------------------------------------------------------------------- /test/cfg/default/templates/generic-contact.cfg: -------------------------------------------------------------------------------- 1 | # Contact definition 2 | # By default the contact will ask notification by mails 3 | define contact{ 4 | name generic-contact 5 | host_notifications_enabled 1 6 | service_notifications_enabled 1 7 | email shinken@localhost 8 | can_submit_commands 1 9 | notificationways email 10 | register 0 11 | } 12 | -------------------------------------------------------------------------------- /test/cfg/default/templates/generic-host.cfg: -------------------------------------------------------------------------------- 1 | # Generic host definition template - This is NOT a real host, just a template! 2 | # Most hosts should inherit from this one 3 | define host{ 4 | name generic-host 5 | 6 | # Checking part 7 | check_command check_host_alive 8 | max_check_attempts 2 9 | check_interval 5 10 | 11 | # Check every time 12 | active_checks_enabled 1 13 | check_period 24x7 14 | 15 | # Notification part 16 | # One notification each day (1440 = 60min* 24h) 17 | # every time, and for all 'errors' 18 | # notify the admins contactgroups by default 19 | contact_groups admins,users 20 | notification_interval 1440 21 | notification_period 24x7 22 | notification_options d,u,r,f 23 | notifications_enabled 1 24 | 25 | # Advanced option. Look at the wiki for more informations 26 | event_handler_enabled 0 27 | flap_detection_enabled 1 28 | process_perf_data 1 29 | 30 | # Maintenance period 31 | #maintenance_period workhours 32 | 33 | # Dispatching 34 | #poller_tag DMZ 35 | #realm All 36 | 37 | # For the WebUI 38 | #icon_set server ; can be database, disk, network_service, server 39 | 40 | # This said that it's a template 41 | register 0 42 | } 43 | 44 | -------------------------------------------------------------------------------- /test/cfg/default/templates/generic-service.cfg: -------------------------------------------------------------------------------- 1 | # Generic service definition template - This is NOT a real service, just a template! 2 | define service{ 3 | name generic-service ; The 'name' of this service template 4 | active_checks_enabled 1 ; Active service checks are enabled 5 | passive_checks_enabled 1 ; Passive service checks are enabled/accepted 6 | notifications_enabled 1 ; Service notifications are enabled 7 | notification_interval 1440 8 | notification_period 24x7 9 | event_handler_enabled 0 ; Service event handler is enabled 10 | flap_detection_enabled 1 ; Flap detection is enabled 11 | process_perf_data 1 ; Process performance data 12 | is_volatile 0 ; The service is not volatile 13 | check_period 24x7 ; The service can be checked at any time of the day 14 | max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state 15 | check_interval 5 ; Check the service every 5 minutes under normal conditions 16 | retry_interval 2 ; Re-check the service every two minutes until a hard state can be determined 17 | notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events 18 | contact_groups admins,users 19 | register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE 20 | } 21 | -------------------------------------------------------------------------------- /test/cfg/default/templates/slack-contact.cfg: -------------------------------------------------------------------------------- 1 | # Contact definition 2 | # By default the contact will ask notification by mails 3 | define contact{ 4 | name slack-contact 5 | use generic-contact 6 | notificationways slack 7 | register 0 8 | 9 | _WEBUI_URL http://shinkenmain:7767 10 | _SLACK_KEY xoxp-18492972628-18498603810-19346398978-b7ce8a2e6a 11 | _SLACK_TITLE Shinken Fred 12 | _SLACK_CHANNEL Shinken 13 | _SLACK_ICON :interrobang: 14 | } 15 | -------------------------------------------------------------------------------- /test/cfg/default/templates/smbits-http.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # HTTP server template 3 | # 4 | define host{ 5 | name smbits-http 6 | use http 7 | 8 | # This said that it's a template 9 | register 0 10 | } 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/cfg/default/templates/smbits-https.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # HTTP server template 3 | # 4 | define host{ 5 | name smbits-https 6 | use https 7 | 8 | # This said that it's a template 9 | register 0 10 | } 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/cfg/default/templates/srv-pnp.cfg: -------------------------------------------------------------------------------- 1 | define service { 2 | name srv-pnp 3 | action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$ 4 | register 0 5 | } 6 | -------------------------------------------------------------------------------- /test/cfg/default/timeperiods/24x7.cfg: -------------------------------------------------------------------------------- 1 | define timeperiod{ 2 | timeperiod_name 24x7 3 | alias Always 4 | sunday 00:00-24:00 5 | monday 00:00-24:00 6 | tuesday 00:00-24:00 7 | wednesday 00:00-24:00 8 | thursday 00:00-24:00 9 | friday 00:00-24:00 10 | saturday 00:00-24:00 11 | } 12 | 13 | -------------------------------------------------------------------------------- /test/cfg/default/timeperiods/none.cfg: -------------------------------------------------------------------------------- 1 | # 'none' timeperiod definition 2 | define timeperiod{ 3 | timeperiod_name none 4 | alias No Time Is A Good Time 5 | } 6 | -------------------------------------------------------------------------------- /test/cfg/default/timeperiods/us-holidays.cfg: -------------------------------------------------------------------------------- 1 | # Some U.S. holidays 2 | # Note: The timeranges for each holiday are meant to *exclude* the holidays from being 3 | # treated as a valid time for notifications, etc. You probably don't want your pager 4 | # going off on New Year's. Although you're employer might... :-) 5 | define timeperiod{ 6 | name us-holidays 7 | timeperiod_name us-holidays 8 | alias U.S. Holidays 9 | 10 | january 1 00:00-00:00 ; New Years 11 | monday -1 may 00:00-00:00 ; Memorial Day (last Monday in May) 12 | july 4 00:00-00:00 ; Independence Day 13 | monday 1 september 00:00-00:00 ; Labor Day (first Monday in September) 14 | thursday -1 november 00:00-00:00 ; Thanksgiving (last Thursday in November) 15 | december 25 00:00-00:00 ; Christmas 16 | } 17 | -------------------------------------------------------------------------------- /test/cfg/default/timeperiods/workhours.cfg: -------------------------------------------------------------------------------- 1 | # 'workhours' timeperiod definition 2 | define timeperiod{ 3 | timeperiod_name workhours 4 | alias Normal Work Hours 5 | monday 09:00-17:00 6 | tuesday 09:00-17:00 7 | wednesday 09:00-17:00 8 | thursday 09:00-17:00 9 | friday 09:00-17:00 10 | } 11 | -------------------------------------------------------------------------------- /test/cfg/grafana_queries.json: -------------------------------------------------------------------------------- 1 | { 2 | "Hosts problems": { 3 | "endpoint": "host", 4 | "query": { 5 | "_overall_state_id": {"$gt": 2}, "_is_template": false 6 | } 7 | }, 8 | "Hosts up": { 9 | "endpoint": "host", 10 | "query": { 11 | "ls_state_id": 0, "_is_template": false 12 | } 13 | } 14 | ,"Hosts down": { 15 | "endpoint": "host", 16 | "query": { 17 | "ls_state_id": {"$in": [1, 2]}, "_is_template": false 18 | } 19 | } 20 | ,"Hosts unreachable": { 21 | "endpoint": "host", 22 | "query": { 23 | "ls_state_id": {"$gt": 2}, "_is_template": false 24 | } 25 | }, 26 | "Services problems": { 27 | "endpoint": "service", 28 | "query": { 29 | "_overall_state_id": {"$gt": 2}, "_is_template": false 30 | } 31 | }, 32 | "Services ok": { 33 | "endpoint": "service", 34 | "query": { 35 | "ls_state_id": 0, "_is_template": false 36 | } 37 | }, 38 | "Services warning": { 39 | "endpoint": "service", 40 | "query": { 41 | "ls_state_id": 1, "_is_template": false 42 | } 43 | }, 44 | "Services critical": { 45 | "endpoint": "service", 46 | "query": { 47 | "ls_state_id": 2, "_is_template": false 48 | } 49 | }, 50 | "Services unreachable": { 51 | "endpoint": "service", 52 | "query": { 53 | "ls_state_id": { 54 | "$gt": 2 55 | }, 56 | "_is_template": false 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /test/cfg/grafana_tables.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": [ 3 | "name", "alias", "business_impact", "tags", 4 | "active_checks_enabled", "passive_checks_enabled", 5 | "_overall_state_id", 6 | "ls_state", "ls_state_id", "ls_state_type", "ls_last_check", 7 | "ls_acknowledged", "ls_downtimed", 8 | "ls_grafana_panelid" 9 | ], 10 | "service": [ 11 | "host", 12 | "name", "alias", "business_impact", "tags", 13 | "active_checks_enabled", "passive_checks_enabled", 14 | "_overall_state_id", 15 | "ls_state", "ls_state_id", "ls_state_type", "ls_last_check", 16 | "ls_acknowledged", "ls_downtimed", 17 | "ls_grafana_panelid" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /test/cfg/host_srv001.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "srv001", 3 | "alias": "Server #1", 4 | "address": "192.168.0.2", 5 | "realm": "", 6 | "business_impact": 5, 7 | "check_command": "", 8 | "tags": ["t1", "t2"] 9 | } 10 | -------------------------------------------------------------------------------- /test/cfg/host_template.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "host_template", 3 | "_is_template": true, 4 | "address": "192.168.0.2", 5 | "realm": "", 6 | "business_impact": 5, 7 | "check_command": "" 8 | } 9 | -------------------------------------------------------------------------------- /test/cfg/host_template_ping.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "template_ping", 3 | "address": "192.168.0.2", 4 | "realm": "", 5 | "business_impact": 5, 6 | "check_command": "", 7 | "_is_template": true 8 | } 9 | -------------------------------------------------------------------------------- /test/cfg/pack-linux-nrpe/commands.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "_realm": "All", 4 | "_sub_realm": true, 5 | "alias": "NRPE Version", 6 | "command_line": "$NRPE_PLUGINS_DIR$/check_nrpe -H $HOSTADDRESS$ -t $_HOSTNRPE_TIMEOUT$ -u -n", 7 | "enable_environment_macros": false, 8 | "imported_from": "alignak-checks-linux-nrpe", 9 | "name": "check_nrpe_version", 10 | "poller_tag": "", 11 | "timeout": -1 12 | }, 13 | { 14 | "_realm": "All", 15 | "_sub_realm": true, 16 | "alias": "NRPE checked host check", 17 | "command_line": "$NRPE_PLUGINS_DIR$/check_nrpe -H $HOSTADDRESS$ -t $_HOSTNRPE_TIMEOUT$ -u -n", 18 | "enable_environment_macros": false, 19 | "imported_from": "alignak-checks-linux-nrpe", 20 | "name": "check_nrpe_alive", 21 | "poller_tag": "", 22 | "timeout": -1 23 | }, 24 | { 25 | "_realm": "All", 26 | "_sub_realm": true, 27 | "alias": "NRPE check", 28 | "command_line": "$NRPE_PLUGINS_DIR$/check_nrpe -H $HOSTADDRESS$ -t $_HOSTNRPE_TIMEOUT$ -u -n -c $ARG1$", 29 | "enable_environment_macros": false, 30 | "imported_from": "alignak-checks-linux-nrpe", 31 | "name": "check_nrpe", 32 | "poller_tag": "", 33 | "timeout": -1 34 | }, 35 | { 36 | "_realm": "All", 37 | "_sub_realm": true, 38 | "alias": "NRPE check with arguments", 39 | "command_line": "$NRPE_PLUGINS_DIR$/check_nrpe -H $HOSTADDRESS$ -t $_HOSTNRPE_TIMEOUT$ -u -n -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$", 40 | "enable_environment_macros": false, 41 | "imported_from": "alignak-checks-linux-nrpe", 42 | "name": "check_nrpe_args", 43 | "poller_tag": "", 44 | "timeout": -1 45 | } 46 | ] -------------------------------------------------------------------------------- /test/cfg/pack-linux-nrpe/hosts-templates.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "_is_template": true, 4 | "_realm": "All", 5 | "_sub_realm": true, 6 | "_templates_with_services": true, 7 | "active_checks_enabled": true, 8 | "alias": "", 9 | "check_command": "check_nrpe_alive", 10 | "check_command_args": "", 11 | "check_period": "24x7", 12 | "customs": { 13 | "_OS": "Linux", 14 | "_NRPE_TIMEOUT": "10" 15 | }, 16 | "imported_from": "alignak-checks-linux-nrpe", 17 | "initial_state": "x", 18 | "name": "linux-nrpe", 19 | "notes": "", 20 | "notes_url": "", 21 | "tags": [ 22 | "nrpe-host", "linux" 23 | ] 24 | } 25 | ] -------------------------------------------------------------------------------- /test/cfg/service_srv001_ping.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ping", 3 | "host": "srv001", 4 | "check_command": "ping", 5 | "business_impact": 4 6 | } 7 | -------------------------------------------------------------------------------- /test/cfg/service_srv002_ping.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ping2", 3 | "host": "srv002", 4 | "check_command": "ping", 5 | "business_impact": 5 6 | } 7 | -------------------------------------------------------------------------------- /test/cfg/settings/alignak-backend-logger.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "disable_existing_loggers": false, 4 | "formatters": { 5 | "alignak_backend_extra": { 6 | "format": "[%(asctime)s] %(levelname)s: [%(name)s] %(clientip)s -- %(method)s -- %(url)s -- %(message)s", 7 | "datefmt": "%Y-%m-%d %H:%M:%S" 8 | }, 9 | "alignak_backend": { 10 | "format": "[%(asctime)s] %(levelname)s: [%(name)s] %(message)s", 11 | "datefmt": "%Y-%m-%d %H:%M:%S" 12 | } 13 | }, 14 | 15 | "handlers": { 16 | "console": { 17 | "class": "logging.StreamHandler", 18 | "level": "DEBUG", 19 | "formatter": "alignak_backend", 20 | "stream": "ext://sys.stdout" 21 | }, 22 | "alignak_backend": { 23 | "class": "logging.handlers.TimedRotatingFileHandler", 24 | "level": "DEBUG", 25 | "formatter": "alignak_backend", 26 | "filename": "/tmp/%(daemon)s.log", 27 | "when": "midnight", 28 | "interval": 1, 29 | "backupCount": 7, 30 | "encoding": "utf8" 31 | } 32 | }, 33 | 34 | "loggers": { 35 | "eve": { 36 | "level": "INFO", 37 | "handlers": ["alignak_backend"], 38 | "propagate": "no" 39 | } 40 | }, 41 | 42 | "root": { 43 | "level": "ERROR", 44 | "handlers": [] 45 | } 46 | } -------------------------------------------------------------------------------- /test/cfg/settings/settings_uncommented.json: -------------------------------------------------------------------------------- 1 | { 2 | "DEBUG": false, 3 | 4 | "HOST": "", 5 | "PORT": 5000, 6 | "SERVER_NAME": null, 7 | 8 | "X_DOMAINS": "*", 9 | 10 | "PAGINATION_LIMIT": 5000, 11 | "PAGINATION_DEFAULT": 50, 12 | 13 | "RATE_LIMIT_GET": null, 14 | "RATE_LIMIT_POST": null, 15 | "RATE_LIMIT_PATCH": null, 16 | "RATE_LIMIT_DELETE": null, 17 | 18 | "MONGO_URI": "mongodb:\/\/localhost:27017\/alignak-backend", 19 | "MONGO_HOST": "localhost", 20 | "MONGO_PORT": 27017, 21 | "MONGO_DBNAME": "alignak-backend", 22 | "MONGO_USERNAME": null, 23 | "MONGO_PASSWORD": null, 24 | 25 | "IP_CRON": ["127.0.0.1"], 26 | 27 | 28 | "LOGGER": "alignak-backend-logger.json", 29 | 30 | "ALIGNAK_URL": "http:\/\/127.0.0.1:7770", 31 | 32 | "SCHEDULER_ALIGNAK_ACTIVE": false, 33 | "SCHEDULER_ALIGNAK_PERIOD": 10, 34 | 35 | "SCHEDULER_TIMESERIES_ACTIVE": false, 36 | "SCHEDULER_TIMESERIES_PERIOD": 10, 37 | "SCHEDULER_GRAFANA_ACTIVE": false, 38 | "SCHEDULER_GRAFANA_PERIOD": 120, 39 | 40 | "GRAFANA_DATASOURCE": true, 41 | "GRAFANA_DATASOURCE_QUERIES": "grafana_queries.json", 42 | "GRAFANA_DATASOURCE_TABLES": "grafana_tables.json", 43 | "SCHEDULER_LIVESYNTHESIS_HISTORY": 60 44 | } 45 | -------------------------------------------------------------------------------- /test/cfg/settings/uwsgi.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | http-socket = 0.0.0.0:5000 3 | 4 | # Uncomment if you installed from distribution packaging 5 | # plugin = python 6 | # Uncomment if you installed from distribution packaging 7 | # plugin = logfile 8 | 9 | # Python module 10 | module = alignak_backend.app:app 11 | 12 | enable-threads = true 13 | processes = 4 14 | 15 | # Log requests activity (disable by default because too verbose) 16 | # req-logger = file:/usr/local/var/log/alignak-backend/backend-access.log 17 | # Log information, errors... 18 | logger = file:/usr/local/var/log/alignak-backend/backend-error.log 19 | 20 | # Report memory activity to the stats 21 | memory-report = true 22 | 23 | # Define specific uid/gid if uWSGI started as root 24 | uid = alignak 25 | guid = alignak 26 | 27 | # Default buffer size for HTTP header is very low (4096) 28 | buffer-size = 32768 29 | 30 | # uWSGI master process: use a master process and store its pid 31 | master = true 32 | pidfile = /tmp/alignak-backend.pid 33 | 34 | # --- 35 | # Statistics part 36 | # Uncomment this line to activate statistics sending to carbon/graphite 37 | # carbon = 127.0.0.1:2003 38 | # defaults to uwsgi 39 | carbon-root = alignak-backend 40 | # replace dots in hostnames 41 | carbon-hostname-dots = - 42 | -------------------------------------------------------------------------------- /test/requirements.txt: -------------------------------------------------------------------------------- 1 | # Python requirements for unit tests 2 | # Include main application requirements 3 | -r ../requirements.txt 4 | 5 | unittest2 6 | 7 | # Web test 8 | WebTest 9 | 10 | # Use py.test as test-runner 11 | pytest 12 | pytest-cov 13 | 14 | # Tests time freeze 15 | freezegun 16 | 17 | # code coverage 18 | coverage 19 | 20 | # Report coverage results to coveralls.io 21 | coveralls 22 | 23 | # Static code analysis libraries 24 | pycodestyle==2.4.0 25 | pylint==1.9.1 26 | pep257==0.7.0 27 | 28 | # uWSGI server 29 | uWSGI 30 | 31 | # Mock 32 | mock 33 | requests-mock -------------------------------------------------------------------------------- /test/setup_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright (C) 2015-2018: Alignak team, see AUTHORS.txt file for contributors 4 | # 5 | # This file is part of Alignak. 6 | # 7 | # Alignak is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Alignak is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with Alignak. If not, see . 19 | 20 | set -e 21 | 22 | THIS_PATH=$(dirname "$0") 23 | BASE_PATH=$(dirname "$THIS_PATH") 24 | 25 | cd $BASE_PATH 26 | 27 | pip install --upgrade pip 28 | 29 | # Force upgrading six else uninstalling six 1.10 to upgrade 1.11 breaks the Travis build for Python 3.4 ! 30 | pip install --upgrade six 31 | pip freeze 32 | 33 | # Install application AND tests requirements : 34 | pip install --upgrade -r test/requirements.txt 35 | pip install -e . 36 | 37 | pyversion=$(python -c "import sys; print(''.join(map(str, sys.version_info[:2])))") 38 | if test -e "test/requirements.py${pyversion}.txt" 39 | then 40 | pip install -r "test/requirements.py${pyversion}.txt" 41 | fi 42 | -------------------------------------------------------------------------------- /tools/generate_model_graph.py: -------------------------------------------------------------------------------- 1 | from alignak_backend.models import register_models 2 | 3 | from graphviz import Digraph 4 | 5 | dot = Digraph(format='png') 6 | # dot.node_attr.update(color='lightblue2', style='filled') 7 | # dot.graph_attr.update(nodesep='0.1') 8 | dot.graph_attr.update(size="140,140") 9 | # dot.edge_attr.update(weight='2.1') 10 | 11 | models = register_models() 12 | 13 | for name, schema in models.items(): 14 | color = '' 15 | if name == 'host': 16 | color = 'red' 17 | elif name == 'service': 18 | color = 'green' 19 | dot.node(name, color=color) 20 | for key, value in schema['schema'].items(): 21 | style = 'dashed' 22 | if 'required' in value and value['required']: 23 | style = 'solid' 24 | if not key.startswith("_"): 25 | if value['type'] == 'objectid': 26 | dot.edge(name, value['data_relation']['resource'], color=color, label=key, fontcolor=color, style=style) 27 | elif value['type'] == 'list' and 'schema' in value: 28 | if value['schema']['type'] == 'objectid': 29 | dot.edge(name, value['schema']['data_relation']['resource'], color=color, label=key, fontcolor=color, style=style) 30 | 31 | dot.render('model_schema', view=False) -------------------------------------------------------------------------------- /tools/model_schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alignak-monitoring-contrib/alignak-backend/d0f92f3d3552199841cc08d646ec0fa6dd42afd5/tools/model_schema.png --------------------------------------------------------------------------------