diff --git a/orientdb/tasks/main.yml b/orientdb/tasks/main.yml index 2e7017f..f96b686 100644 --- a/orientdb/tasks/main.yml +++ b/orientdb/tasks/main.yml @@ -64,6 +64,14 @@ notify: Restart orientdb tags: [ 'orientdb', 'orientdb_config' ] + - name: Install the nagios nrpe configuration + template: src=orientdb-nrpe.cfg.j2 dest={{ nrpe_include_dir }}/orientdb-nrpe.cfg owner=root group=root mode=0444 + notify: Reload NRPE server + when: + - nrpe_include_dir is defined + - nagios_enabled is defined and nagios_enabled + tags: [ 'orientdb', 'orientdb_nagios' ] + - name: Ensure that the service is enabled and running service: name=orientdb state=started enabled=yes when: orientdb_enabled diff --git a/orientdb/templates/orientdb-nrpe.cfg.j2 b/orientdb/templates/orientdb-nrpe.cfg.j2 new file mode 100644 index 0000000..09d14d3 --- /dev/null +++ b/orientdb/templates/orientdb-nrpe.cfg.j2 @@ -0,0 +1,3 @@ + +# Restart orientdb (via handler) +command[global_restart_orientdb]=/usr/bin/sudo /etc/init.d/orientdb restart