[Pkg-nagios-changes] [pkg-nagvis] 02/05: Shinken support

Markus Frosch lazyfrosch-guest at moszumanska.debian.org
Fri Dec 27 17:13:22 UTC 2013


This is an automated email from the git hooks/post-receive script.

lazyfrosch-guest pushed a commit to branch master
in repository pkg-nagvis.

commit 32533958d861bbe3025c289e7d281273e989d23c
Author: Mathieu Parent <math.parent at gmail.com>
Date:   Thu Dec 26 10:45:08 2013 +0100

    Shinken support
    
    Signed-off-by: Markus Frosch <markus at lazyfrosch.de>
    Closes: #733139
---
 debian/nagvis.postinst  | 13 +++++++++++--
 debian/nagvis.templates |  4 ++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/debian/nagvis.postinst b/debian/nagvis.postinst
index 4a2cfe6..4220b70 100644
--- a/debian/nagvis.postinst
+++ b/debian/nagvis.postinst
@@ -91,7 +91,7 @@ case "$1" in
         db_get nagvis/monitoring_system
         MONITORING="$RET"
         case "$MONITORING" in
-            "icinga"|"nagios")
+            "icinga"|"nagios"|"shinken")
                 ## Creating Configuration file for Nagvis
                 nagvis_tmp=$(mktemp)
                 cat /usr/share/nagvis/defaults/nagvis.ini.php-sample | sed \
@@ -114,6 +114,11 @@ case "$1" in
                           -e "s#;htmlcgi=\"/nagios/cgi-bin\"#htmlcgi=\"/nagios/cgi-bin\"#" \
                           -e "s#;socket=\"unix:/usr/local/nagios/var/rw/live\"#socket=\"unix:/var/lib/nagios3/rw/live\"#"
                     ;;
+                    "shinken")
+                        sed -i "$nagvis_tmp" \
+                          -e "s#;htmlcgi=\"/nagios/cgi-bin\"#htmlcgi=\"/nagios/cgi-bin\"#" \
+                          -e "s#;socket=\"unix:/usr/local/nagios/var/rw/live\"#socket=\"tcp:localhost:50000\"#"
+                    ;;
                 esac
                 chgrp www-data "$nagvis_tmp"
                 chmod g+rw "$nagvis_tmp"
@@ -135,6 +140,10 @@ case "$1" in
                         sed -i "$apache_tmp" \
                           -e "s#@NAGIOS_PATH@/etc#/etc/nagios3#g"
                     ;;
+                    "shinken")
+                        sed -i "$apache_tmp" \
+                          -e "s#@NAGIOS_PATH@/etc#/etc/shinken#g"
+                    ;;
                 esac
                 chmod go+r "$apache_tmp"
                 ucf --debconf-ok "$apache_tmp" /etc/nagvis/apache2.conf
@@ -147,7 +156,7 @@ case "$1" in
         esac
 
         # enable apache when file exists and we are on autoconfigure
-        if [ -f /etc/nagvis/apache2.conf ] && ( [ "$MONITORING" = "nagios" ] || [ "$MONITORING" = "icinga" ] ); then
+        if [ -f /etc/nagvis/apache2.conf ] && ( [ "$MONITORING" = "nagios" ] || [ "$MONITORING" = "icinga" ] || [ "$MONITORING" = "shinken" ] ); then
             echo "enabling Apache2 config..."
 
             COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
diff --git a/debian/nagvis.templates b/debian/nagvis.templates
index 1b84b0e..3ab0fe2 100644
--- a/debian/nagvis.templates
+++ b/debian/nagvis.templates
@@ -10,8 +10,8 @@
 Template: nagvis/monitoring_system
 Type: select
 Default: icinga
-#flag:translate:3
-__Choices: icinga, nagios, other
+#flag:translate:4
+__Choices: icinga, nagios, shinken, other
 _Description: Monitoring suite used with NagVis:
  The NagVis package supports Icinga as well as
  Nagios, using the check-mk-live broker backend.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagvis.git



More information about the Pkg-nagios-changes mailing list