Correct patches
This commit is contained in:
parent
c49b267d76
commit
95827f571e
66
README.md
66
README.md
@ -65,3 +65,69 @@ make all
|
|||||||
etc....but some of us (me) prefers to have a software package, to organize
|
etc....but some of us (me) prefers to have a software package, to organize
|
||||||
software installation/update/removal.
|
software installation/update/removal.
|
||||||
|
|
||||||
|
@@ -8,3 +8,8 @@
|
||||||
|
|
||||||
|
http://pnp4nagios.sourceforge.net or:
|
||||||
|
http://docs.pnp4nagios.org/
|
||||||
|
|
||||||
|
## pnp-metrics-api ###
|
||||||
|
|
||||||
|
https://github.com/lingej/pnp-metrics-api
|
||||||
|
README.md
|
||||||
|
|
||||||
|
# pnp-metrics-api
|
||||||
|
## Usage examples
|
||||||
|
### CURL
|
||||||
|
#### Query metrics of a service on a specific host
|
||||||
|
```
|
||||||
|
curl -s -u '<username>:<password>' -H "Content-Type: application/json" -X POST -d '
|
||||||
|
{
|
||||||
|
"targets":[
|
||||||
|
{
|
||||||
|
"host":"host1.example.org",
|
||||||
|
"service":"_HOST_",
|
||||||
|
"perflabel":"rta",
|
||||||
|
"type":"AVERAGE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host":"host2.example.org",
|
||||||
|
"service":"_HOST_",
|
||||||
|
"perflabel":"rta",
|
||||||
|
"type":"AVERAGE"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"start":'UNIXEPOCHTIMESTAMP_START',
|
||||||
|
"end":'UNIXEPOCHTIMESTAMP_END'
|
||||||
|
}' https://example.org/pnp4nagios/index.php/api/metrics
|
||||||
|
```
|
||||||
|
#### List all hosts
|
||||||
|
```
|
||||||
|
curl -s -u '<username>:<password>' https://example.org/pnp4nagios/index.php/api/hosts
|
||||||
|
```
|
||||||
|
|
||||||
|
#### List services of a host
|
||||||
|
```
|
||||||
|
curl -s -u '<username>:<password>' -H "Content-Type: application/json" -X POST -d '
|
||||||
|
{
|
||||||
|
"host":"host.example.org"
|
||||||
|
}' https://example.org/pnp4nagios/index.php/api/services
|
||||||
|
```
|
||||||
|
|
||||||
|
You can use regular expressions for host lists:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -s -u '<username>:<password>' -H "Content-Type: application/json" -X POST -d '
|
||||||
|
{
|
||||||
|
"host":"/^local"
|
||||||
|
}' https://example.org/pnp4nagios/index.php/api/services
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### List labels of a service of specific host
|
||||||
|
```
|
||||||
|
curl -s -u '<username>:<password>' -H "Content-Type: application/json" -X POST -d '
|
||||||
|
{
|
||||||
|
"host":"host.example.org",
|
||||||
|
"service":"_HOST_"
|
||||||
|
}' https://example.org/pnp4nagios/index.php/api/labels
|
||||||
|
```
|
||||||
|
@ -491,7 +491,7 @@ fi
|
|||||||
|
|
||||||
AC_SUBST(nagios_user)
|
AC_SUBST(nagios_user)
|
||||||
AC_SUBST(nagios_grp)
|
AC_SUBST(nagios_grp)
|
||||||
INSTALL_OPTS="-o $nagios_user -g $nagios_grp"
|
INSTALL_OPTS=""
|
||||||
AC_SUBST(INSTALL_OPTS)
|
AC_SUBST(INSTALL_OPTS)
|
||||||
|
|
||||||
#
|
#
|
||||||
|
2
debian/patches/adjust-template-path
vendored
2
debian/patches/adjust-template-path
vendored
@ -4,7 +4,7 @@ Author: Sven Velt <sven@velt.de>, Sebastian Harl <tokkee@debian.org
|
|||||||
Forwarded: not-needed
|
Forwarded: not-needed
|
||||||
|
|
||||||
--- a/sample-config/pnp/config.php.in
|
--- a/sample-config/pnp/config.php.in
|
||||||
+++ b/sample-config/pnp/config.php.in
|
+++ b/sample-config/config_samples/config.php.in
|
||||||
@@ -230,13 +230,19 @@ $conf['RRD_DAEMON_OPTS'] = '';
|
@@ -230,13 +230,19 @@ $conf['RRD_DAEMON_OPTS'] = '';
|
||||||
# Add your own template directories here
|
# Add your own template directories here
|
||||||
# First match wins!
|
# First match wins!
|
||||||
|
10
debian/patches/config_instances
vendored
10
debian/patches/config_instances
vendored
@ -4,10 +4,10 @@ Last-Update: 2017-05-20
|
|||||||
---
|
---
|
||||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||||
--- a/sample-config/pnp/config.php.in 2017-05-20 17:52:02.532000000 +0200
|
--- a/sample-config/pnp/config.php.in 2017-05-20 17:52:02.532000000 +0200
|
||||||
+++ b/sample-config/pnp/config.php.in 2017-05-20 17:48:33.008000000 +0200
|
+++ b/sample-config/config_samples/config.php.in 2017-05-20 17:48:33.008000000 +0200
|
||||||
@@ -89,7 +89,8 @@
|
@@ -100,7 +100,8 @@
|
||||||
#
|
#
|
||||||
# Link back to Nagios or Thruk ( www.thruk.org )
|
# Link back to Nagios or Thruk ( www.thruk.org )
|
||||||
#
|
#
|
||||||
-$conf['nagios_base'] = "/cgi-bin/nagios4";
|
-$conf['nagios_base'] = "/cgi-bin/nagios4";
|
||||||
+## Debian: please see /etc/pnp4nagios/config.<NAME>.php
|
+## Debian: please see /etc/pnp4nagios/config.<NAME>.php
|
||||||
@ -15,7 +15,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Link back to check_mk´s multisite ( http://mathias-kettner.de/checkmk_multisite.html )
|
# Link back to check_mk´s multisite ( http://mathias-kettner.de/checkmk_multisite.html )
|
||||||
@@ -278,4 +279,10 @@
|
@@ -291,3 +292,9 @@
|
||||||
'#F6E8C3','#C7EAE5','#DFC27D','#80CDC1','#BF812D','#35978F','#8C510A','#01665E');
|
'#F6E8C3','#C7EAE5','#DFC27D','#80CDC1','#BF812D','#35978F','#8C510A','#01665E');
|
||||||
$scheme['mixed3'] = array ('#67001F','#80CDC1','#B2182B','#35978F','#D6604D','#01665E','#F4A582','#003C30',
|
$scheme['mixed3'] = array ('#67001F','#80CDC1','#B2182B','#35978F','#D6604D','#01665E','#F4A582','#003C30',
|
||||||
'#FDDBC7','#92C5DE','#D1E5F0','#2166AC','#4393C3','#8C510A','#053061','#BF812D');
|
'#FDDBC7','#92C5DE','#D1E5F0','#2166AC','#4393C3','#8C510A','#053061','#BF812D');
|
||||||
@ -25,4 +25,4 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
|||||||
+} else if (file_exists('/etc/pnp4nagios/config.nagios4.php')) {
|
+} else if (file_exists('/etc/pnp4nagios/config.nagios4.php')) {
|
||||||
+ include '/etc/pnp4nagios/config.nagios4.php';
|
+ include '/etc/pnp4nagios/config.nagios4.php';
|
||||||
+}
|
+}
|
||||||
?>
|
|
||||||
|
6
debian/patches/fix-nagios-url
vendored
6
debian/patches/fix-nagios-url
vendored
@ -3,10 +3,10 @@ Author: Sven Velt <sven@velt.de>
|
|||||||
Forwarded: not-needed
|
Forwarded: not-needed
|
||||||
|
|
||||||
--- a/sample-config/pnp/config.php.in
|
--- a/sample-config/pnp/config.php.in
|
||||||
+++ b/sample-config/pnp/config.php.in
|
+++ b/sample-config/config_samples/config.php.in
|
||||||
@@ -89,7 +89,7 @@ $conf['temp'] = "/var/tmp";
|
@@ -100,7 +100,7 @@
|
||||||
#
|
#
|
||||||
# Link back to Nagios or Thruk ( www.thruk.org )
|
# Link back to Nagios or Thruk ( www.thruk.org )
|
||||||
#
|
#
|
||||||
-$conf['nagios_base'] = "/nagios/cgi-bin";
|
-$conf['nagios_base'] = "/nagios/cgi-bin";
|
||||||
+$conf['nagios_base'] = "/cgi-bin/nagios4";
|
+$conf['nagios_base'] = "/cgi-bin/nagios4";
|
||||||
|
2
debian/patches/fix-npcd-path
vendored
2
debian/patches/fix-npcd-path
vendored
@ -3,7 +3,7 @@ Author: Sven Velt <sven@velt.de>
|
|||||||
Forwarded: not-needed
|
Forwarded: not-needed
|
||||||
|
|
||||||
--- a/sample-config/pnp/npcd.cfg-sample.in
|
--- a/sample-config/pnp/npcd.cfg-sample.in
|
||||||
+++ b/sample-config/pnp/npcd.cfg-sample.in
|
+++ b/sample-config/config_samples/npcd.cfg.in
|
||||||
@@ -76,7 +76,7 @@
|
@@ -76,7 +76,7 @@
|
||||||
# perfdata_spool_dir = </path/to/directory/>
|
# perfdata_spool_dir = </path/to/directory/>
|
||||||
#
|
#
|
||||||
|
8
debian/patches/install_opts
vendored
8
debian/patches/install_opts
vendored
@ -5,12 +5,12 @@ Last-Update: 2014-10-26
|
|||||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -116,7 +116,7 @@
|
@@ -491,7 +491,7 @@
|
||||||
|
|
||||||
|
AC_SUBST(nagios_user)
|
||||||
AC_SUBST(nagios_grp)
|
AC_SUBST(nagios_grp)
|
||||||
AC_DEFINE_UNQUOTED(DEFAULT_NAGIOS_USER,"$nagios_user")
|
|
||||||
AC_DEFINE_UNQUOTED(DEFAULT_NAGIOS_GROUP,"$nagios_grp")
|
|
||||||
-INSTALL_OPTS="-o $nagios_user -g $nagios_grp"
|
-INSTALL_OPTS="-o $nagios_user -g $nagios_grp"
|
||||||
+INSTALL_OPTS=""
|
+INSTALL_OPTS=""
|
||||||
AC_SUBST(INSTALL_OPTS)
|
AC_SUBST(INSTALL_OPTS)
|
||||||
|
|
||||||
# Checks for programs.
|
#
|
||||||
|
23
debian/patches/pnp-metrics-api
vendored
23
debian/patches/pnp-metrics-api
vendored
@ -1,19 +1,20 @@
|
|||||||
diff -uNr pnp4nagios.orig/README pnp4nagios-0.6.26/README
|
diff -uNr pnp4nagios.orig/README.md pnp4nagios-0.6.26/README.md
|
||||||
--- pnp4nagios.orig/README 2017-08-21 17:52:37.000000000 +0200
|
--- pnp4nagios.orig/README.md 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ pnp4nagios-0.6.26/README 2017-10-20 17:29:21.680000000 +0200
|
+++ pnp4nagios-0.6.26/README.md 2017-10-20 17:02:31.336000000 +0200
|
||||||
@@ -8,3 +8,8 @@
|
@@ -65,3 +65,69 @@
|
||||||
|
etc....but some of us (me) prefers to have a software package, to organize
|
||||||
|
software installation/update/removal.
|
||||||
|
|
||||||
http://pnp4nagios.sourceforge.net or:
|
+@@ -8,3 +8,8 @@
|
||||||
http://docs.pnp4nagios.org/
|
+
|
||||||
|
+ http://pnp4nagios.sourceforge.net or:
|
||||||
|
+ http://docs.pnp4nagios.org/
|
||||||
+
|
+
|
||||||
+## pnp-metrics-api ###
|
+## pnp-metrics-api ###
|
||||||
+
|
+
|
||||||
+https://github.com/lingej/pnp-metrics-api
|
+https://github.com/lingej/pnp-metrics-api
|
||||||
+README.md
|
+README.md
|
||||||
diff -uNr pnp4nagios.orig/README.md pnp4nagios-0.6.26/README.md
|
+
|
||||||
--- pnp4nagios.orig/README.md 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ pnp4nagios-0.6.26/README.md 2017-10-20 17:02:31.336000000 +0200
|
|
||||||
@@ -0,0 +1,56 @@
|
|
||||||
+# pnp-metrics-api
|
+# pnp-metrics-api
|
||||||
+## Usage examples
|
+## Usage examples
|
||||||
+### CURL
|
+### CURL
|
||||||
@ -29,7 +30,7 @@ diff -uNr pnp4nagios.orig/README.md pnp4nagios-0.6.26/README.md
|
|||||||
+ "type":"AVERAGE"
|
+ "type":"AVERAGE"
|
||||||
+ },
|
+ },
|
||||||
+ {
|
+ {
|
||||||
+ "host":"host2.example.org",
|
+ "host":"host2.example.org",
|
||||||
+ "service":"_HOST_",
|
+ "service":"_HOST_",
|
||||||
+ "perflabel":"rta",
|
+ "perflabel":"rta",
|
||||||
+ "type":"AVERAGE"
|
+ "type":"AVERAGE"
|
||||||
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -1,4 +1,3 @@
|
|||||||
apache-fix-path-to-userfile
|
|
||||||
fix-npcd-path
|
fix-npcd-path
|
||||||
fix-nagios-url
|
fix-nagios-url
|
||||||
adjust-template-path
|
adjust-template-path
|
||||||
|
@ -100,7 +100,8 @@ $conf['temp'] = "/tmp";
|
|||||||
#
|
#
|
||||||
# Link back to Nagios or Thruk ( www.thruk.org )
|
# Link back to Nagios or Thruk ( www.thruk.org )
|
||||||
#
|
#
|
||||||
$conf['nagios_base'] = "/nagios/cgi-bin";
|
## Debian: please see /etc/pnp4nagios/config.<NAME>.php
|
||||||
|
##$conf['nagios_base'] = "/cgi-bin/nagios4";
|
||||||
|
|
||||||
#
|
#
|
||||||
# Link back to check_mk´s multisite ( http://mathias-kettner.de/checkmk_multisite.html )
|
# Link back to check_mk´s multisite ( http://mathias-kettner.de/checkmk_multisite.html )
|
||||||
@ -291,3 +292,9 @@ $scheme['mixed2'] = array ('#b2182b','#2166ac','#d6604d','#4393c3','#f4a582','
|
|||||||
'#F6E8C3','#C7EAE5','#DFC27D','#80CDC1','#BF812D','#35978F','#8C510A','#01665E');
|
'#F6E8C3','#C7EAE5','#DFC27D','#80CDC1','#BF812D','#35978F','#8C510A','#01665E');
|
||||||
$scheme['mixed3'] = array ('#67001F','#80CDC1','#B2182B','#35978F','#D6604D','#01665E','#F4A582','#003C30',
|
$scheme['mixed3'] = array ('#67001F','#80CDC1','#B2182B','#35978F','#D6604D','#01665E','#F4A582','#003C30',
|
||||||
'#FDDBC7','#92C5DE','#D1E5F0','#2166AC','#4393C3','#8C510A','#053061','#BF812D');
|
'#FDDBC7','#92C5DE','#D1E5F0','#2166AC','#4393C3','#8C510A','#053061','#BF812D');
|
||||||
|
|
||||||
|
if (file_exists('/etc/pnp4nagios/config.icinga.php')) {
|
||||||
|
include '/etc/pnp4nagios/config.icinga.php';
|
||||||
|
} else if (file_exists('/etc/pnp4nagios/config.nagios4.php')) {
|
||||||
|
include '/etc/pnp4nagios/config.nagios4.php';
|
||||||
|
}
|
||||||
|
@ -76,7 +76,7 @@ log_level = 0
|
|||||||
# perfdata_spool_dir = </path/to/directory/>
|
# perfdata_spool_dir = </path/to/directory/>
|
||||||
#
|
#
|
||||||
|
|
||||||
perfdata_spool_dir = @PERFDATA_SPOOL_DIR@
|
perfdata_spool_dir = @PERFDATA_SPOOL_DIR@/npcd/
|
||||||
|
|
||||||
|
|
||||||
# Execute following command for each found file
|
# Execute following command for each found file
|
||||||
@ -163,7 +163,7 @@ pid_file=@piddir@/npcd.pid
|
|||||||
# perfdata_file = </path/to/file>
|
# perfdata_file = </path/to/file>
|
||||||
#
|
#
|
||||||
|
|
||||||
perfdata_file = @localstatedir@/perfdata.dump
|
perfdata_file = @PERFDATA_SPOOL_DIR@/nagios/perfdata.dump
|
||||||
|
|
||||||
|
|
||||||
# perfdata_spool_filename - declare the destination
|
# perfdata_spool_filename - declare the destination
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user