View | Details | Raw Unified | Return to bug 206350 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-9 / +9 lines)
Lines 2-17 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	victorops-nagios
4
PORTNAME=	victorops-nagios
5
PORTVERSION=	1.1.8
5
PORTVERSION=	1.4.20
6
CATEGORIES=	net-mgmt
6
CATEGORIES=	net-mgmt
7
MASTER_SITES=	http://software.victorops.com/
7
MASTER_SITES=	http://software.victorops.com/
8
DISTNAME=	${PORTNAME}_${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}
9
8
10
MAINTAINER=	rand@iteris.com
9
MAINTAINER=	rand@iteris.com
11
COMMENT=	Nagios integration for VictorOps incident notification service
10
COMMENT=	Nagios integration for VictorOps incident notification service
12
11
13
BROKEN=		Unfetchable
14
15
NO_WRKSUBDIR=	YES
12
NO_WRKSUBDIR=	YES
16
NO_BUILD=	YES
13
NO_BUILD=	YES
17
14
Lines 21-27 Link Here
21
OPTIONS_DEFAULT=
18
OPTIONS_DEFAULT=
22
QPAGE_DESC=	Integrate qpage for victorops server problems
19
QPAGE_DESC=	Integrate qpage for victorops server problems
23
20
24
RUN_DEPENDS+=	bash:${PORTSDIR}/shells/bash
21
RUN_DEPENDS+=	bash:${PORTSDIR}/shells/bash \
22
		curl:${PORTSDIR}/ftp/curl
25
23
26
.include <bsd.port.options.mk>
24
.include <bsd.port.options.mk>
27
.if ${PORT_OPTIONS:MQPAGE}
25
.if ${PORT_OPTIONS:MQPAGE}
Lines 37-49 Link Here
37
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily
35
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily
38
	${INSTALL_DATA} ${WRKSRC}/etc/cron.daily/victorops ${STAGEDIR}${PREFIX}/etc/periodic/daily/400.victorops
36
	${INSTALL_DATA} ${WRKSRC}/etc/cron.daily/victorops ${STAGEDIR}${PREFIX}/etc/periodic/daily/400.victorops
39
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/nagios
37
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/nagios
40
.for i in victorops victorops_email vo_test_svc vo_test_svc_cmd
41
	${INSTALL_DATA} ${WRKSRC}/opt/victorops/nagios_plugin/nagios_conf/${i}.cfg ${STAGEDIR}${PREFIX}/etc/nagios/${i}.cfg-sample
42
.endfor
43
	${MKDIR} ${STAGEDIR}${PREFIX}/libexec/victorops
38
	${MKDIR} ${STAGEDIR}${PREFIX}/libexec/victorops
39
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/victorops
40
	${MKDIR} ${STAGEDIR}/var/log/victorops
41
	${INSTALL_DATA} ${WRKSRC}/opt/victorops/nagios_plugin/nagios_conf/victorops.cfg ${STAGEDIR}${PREFIX}/etc/nagios/victorops.cfg-sample
42
	${INSTALL_DATA} ${WRKSRC}/opt/victorops/nagios_plugin/conf/env.sh.sample ${STAGEDIR}${PREFIX}/etc/victorops
43
	${INSTALL_DATA} ${WRKSRC}/opt/victorops/nagios_plugin/conf/proxy.sh.sample ${STAGEDIR}${PREFIX}/etc/victorops
44
.for i in check_test_svc check_victorops_cmds check_victorops_forwarder \
44
.for i in check_test_svc check_victorops_cmds check_victorops_forwarder \
45
	do_victorops_heartbeat enqueue_alert forward_alert_file forward_alerts \
45
	do_victorops_heartbeat enqueue_alert forward_alert_file forward_alerts \
46
	send_email_alert send_status stop_forwarder support_collect.sh \
46
	send_email_alert send_status stop_forwarder \
47
	url_encode.sed utils
47
	url_encode.sed utils
48
	${INSTALL_SCRIPT} ${WRKSRC}/opt/victorops/nagios_plugin/bin/${i} ${STAGEDIR}${PREFIX}/libexec/victorops/${i}
48
	${INSTALL_SCRIPT} ${WRKSRC}/opt/victorops/nagios_plugin/bin/${i} ${STAGEDIR}${PREFIX}/libexec/victorops/${i}
49
.endfor
49
.endfor
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (victorops-nagios_1.1.8.tar.gz) = 796e146552e27b45d0339c9c74883ba8048125887461f9e69a1e36cbd752e1a2
1
SHA256 (victorops-nagios-1.4.20.tar.gz) = 87d8c87182e8945357cb9b602d19452754a4decb4809a8594a2495a04f3d9664
2
SIZE (victorops-nagios_1.1.8.tar.gz) = 12838
2
SIZE (victorops-nagios-1.4.20.tar.gz) = 1678731
(-)files/qpage-patch (-21 / +10 lines)
Lines 1-38 Link Here
1
--- opt/victorops/nagios_plugin/bin/send_email_alert.orig	2014-06-11 10:39:13.918151547 -0500
1
--- opt/victorops/nagios_plugin/bin/send_email_alert.orig	2016-01-16 21:20:46 UTC
2
+++ opt/victorops/nagios_plugin/bin/send_email_alert	2014-06-11 11:20:43.930977406 -0500
2
+++ opt/victorops/nagios_plugin/bin/send_email_alert
3
@@ -31,6 +31,7 @@
3
@@ -34,6 +34,7 @@ fi
4
 # Build the contact email list
4
 # Build the contact email list
5
 ORG_SLUG="$(getVal _CONTACTVO_ORGANIZATION_ID unkonwn_org)"
5
 ORG_SLUG="$(getVal _CONTACTVO_ORGANIZATION_ID unkonwn_org)"
6
 CONTACTEMAIL="$(getVal _CONTACTVO_CONTACTEMAIL)"
6
 CONTACTEMAIL="$(getVal _CONTACTVO_CONTACTEMAIL)"
7
+CONTACTPAGER="$(getVal CONTACTPAGER)"
7
+CONTACTPAGER="$(getVal CONTACTPAGER)"
8
 VO_CONTACT="failsafe+$ORG_SLUG@victorops.net"
8
 VO_CONTACT="failsafe+$ORG_SLUG@victorops.net"
9
 WGET_LOG=/tmp/victorops_forward_wget.out
9
 WGET_LOG=$LOG_DIR/victorops_forward_wget.out
10
 STDERR_LOG=/tmp/victorops_forward_wget.err
10
 STDERR_LOG=$LOG_DIR/victorops_forward_wget.err
11
@@ -42,10 +43,16 @@
11
@@ -45,10 +46,16 @@ if (( $IS_SERVICE )); then
12
     if [ "$CONTACTEMAIL" != "" ]; then
12
     if [ "$CONTACTEMAIL" != "" ]; then
13
         $PRINTF "%b" "***** Alert *****\n\nNotification Type: $(getVal NOTIFICATIONTYPE)\n\nService: $(getVal SERVICEDESC)\nHost: $(getVal HOSTALIAS)\nAddress: $(getVal HOSTADDRESS)\nState: $(getVal SERVICESTATE)\n\nDate/Time: $(getVal LONGDATETIME)\n\nAdditional Info:\n\n$(getVal SERVICEOUTPUT)\n\n" | $MAIL -s "** $(getVal NOTIFICATIONTYPE) Service Alert: $(getVal HOSTALIAS)/$(getVal SERVICEDESC) is $(getVal SERVICESTATE) **" $CONTACTEMAIL
13
         printf "%b" "***** Alert *****\n\nNotification Type: $(getVal NOTIFICATIONTYPE)\n\nService: $(getVal SERVICEDESC)\nHost: $(getVal HOSTALIAS)\nAddress: $(getVal HOSTADDRESS)\nState: $(getVal SERVICESTATE)\n\nDate/Time: $(getVal LONGDATETIME)\n\nAdditional Info:\n\n$(getVal SERVICEOUTPUT)\n\n" | mail -s "** $(getVal NOTIFICATIONTYPE) Service Alert: $(getVal HOSTALIAS)/$(getVal SERVICEDESC) is $(getVal SERVICESTATE) **" $CONTACTEMAIL
14
     fi
14
     fi
15
+    if [ "$CONTACTPAGER" != "" ]; then
15
+    if [ "$CONTACTPAGER" != "" ]; then
16
+        $PRINTF "%b" "$(getVal SERVICEDESC) $(getVal NOTIFICATIONTYPE) for $(getVal HOSTNAME) is $(getVal SERVICESTATE) at $(getVal TIME) $(getVal SERVICEOUTPUT)" | $QPAGE -f icinga $CONTACTPAGER
16
+        printf "%b" "$(getVal SERVICEDESC) $(getVal NOTIFICATIONTYPE) for $(getVal HOSTNAME) is $(getVal SERVICESTATE) at $(getVal TIME) $(getVal SERVICEOUTPUT)" | qpage -f icinga $CONTACTPAGER
17
+    fi
17
+    fi
18
 else
18
 else
19
     if [ "$CONTACTEMAIL" != "" ]; then
19
     if [ "$CONTACTEMAIL" != "" ]; then
20
         $PRINTF "%b" "***** Alert *****\n\nNotification Type: $(getVal NOTIFICATIONTYPE)\nHost: $(getVal HOSTNAME)\nState: $(getVal HOSTSTATE)\nAddress: $(getVal HOSTADDRESS)\nInfo: $(getVal HOSTOUTPUT)\n\nDate/Time: $(getVal LONGDATETIME)\n" | $MAIL -s "** $(getVal NOTIFICATIONTYPE) Host Alert: $(getVal HOSTNAME) is $(getVal HOSTSTATE) **" $CONTACTEMAIL
20
         printf "%b" "***** Alert *****\n\nNotification Type: $(getVal NOTIFICATIONTYPE)\nHost: $(getVal HOSTNAME)\nState: $(getVal HOSTSTATE)\nAddress: $(getVal HOSTADDRESS)\nInfo: $(getVal HOSTOUTPUT)\n\nDate/Time: $(getVal LONGDATETIME)\n" | mail -s "** $(getVal NOTIFICATIONTYPE) Host Alert: $(getVal HOSTNAME) is $(getVal HOSTSTATE) **" $CONTACTEMAIL
21
     fi
21
     fi
22
+    if [ "$CONTACTPAGER" != "" ]; then
22
+    if [ "$CONTACTPAGER" != "" ]; then
23
+        $PRINTF "%b" "$(getVal HOSTNAME) is $(getVal HOSTSTATE) at $(getVal TIME) -- $(getVal HOSTOUTPUT)" | $QPAGE -f icinga $CONTACTPAGER
23
+        printf "%b" "$(getVal HOSTNAME) is $(getVal HOSTSTATE) at $(getVal TIME) -- $(getVal HOSTOUTPUT)" | qpage -f icinga $CONTACTPAGER
24
+    fi
24
+    fi
25
 fi
25
 fi
26
 # ***
26
 # ***
27
 # *** Make sure the mail command is the last thing in this file so the including file can check the exit code
27
 # *** Make sure the mail command is the last thing in this file so the including file can check the exit code
28
--- opt/victorops/nagios_plugin/bin/utils.orig   2014-06-16 20:12:16.713013963 -0500
29
+++ opt/victorops/nagios_plugin/bin/utils        2014-06-16 20:12:58.533005832 -0500
30
@@ -110,6 +110,7 @@
31
 MV=$(findApp mv)
32
 PRINTF=$(findApp printf)
33
 PS=$(findApp ps)
34
+QPAGE=$(findApp qpage)
35
 SED=$(findApp sed)
36
 SLEEP=$(findApp sleep)
37
 TAR=$(findApp tar)
38
(-)pkg-plist (-5 / +5 lines)
Lines 1-7 Link Here
1
etc/nagios/victorops.cfg-sample
1
@sample etc/victorops/env.sh.sample
2
etc/nagios/victorops_email.cfg-sample
2
@sample etc/victorops/proxy.sh.sample
3
etc/nagios/vo_test_svc.cfg-sample
3
@sample etc/nagios/victorops.cfg-sample
4
etc/nagios/vo_test_svc_cmd.cfg-sample
5
etc/periodic/daily/400.victorops
4
etc/periodic/daily/400.victorops
6
libexec/victorops/check_test_svc
5
libexec/victorops/check_test_svc
7
libexec/victorops/check_victorops_cmds
6
libexec/victorops/check_victorops_cmds
Lines 13-18 Link Here
13
libexec/victorops/send_email_alert
12
libexec/victorops/send_email_alert
14
libexec/victorops/send_status
13
libexec/victorops/send_status
15
libexec/victorops/stop_forwarder
14
libexec/victorops/stop_forwarder
16
libexec/victorops/support_collect.sh
17
libexec/victorops/url_encode.sed
15
libexec/victorops/url_encode.sed
18
libexec/victorops/utils
16
libexec/victorops/utils
17
@dir etc/victorops
18
@dir /var/log/victorops

Return to bug 206350