[pkg-nagios-changes] [Git][nagios-team/monitoring-plugins][experimental] 2 commits: Adding d/p/20_chech_nt_fix_encoding from upstream
Jan Wagner (@waja)
gitlab at salsa.debian.org
Wed May 10 16:46:25 BST 2023
Jan Wagner pushed to branch experimental at Debian Nagios Maintainer Group / monitoring-plugins
Commits:
e0cfe77e by Jan Wagner at 2023-05-10T15:39:06+00:00
Adding d/p/20_chech_nt_fix_encoding from upstream
- - - - -
3da21634 by Jan Wagner at 2023-05-10T15:40:58+00:00
Adding d/p/21_check_pgsql_extra_output from upstream
- - - - -
3 changed files:
- + debian/patches/20_chech_nt_fix_encoding
- + debian/patches/21_check_pgsql_extra_output
- debian/patches/series
Changes:
=====================================
debian/patches/20_chech_nt_fix_encoding
=====================================
@@ -0,0 +1,46 @@
+From b2659391aba7e4a79b678aba5cc21b443626f81f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lorenz=20K=C3=A4stle?= <lorenz.kaestle at netways.de>
+Date: Wed, 26 Apr 2023 10:13:51 +0200
+Subject: [PATCH 1/2] check_nt: change encoding from latin1 to utf8
+
+---
+ plugins/check_nt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/check_nt.c b/plugins/check_nt.c
+index 59c135dba..babe3b642 100644
+--- a/plugins/check_nt.c
++++ b/plugins/check_nt.c
+@@ -341,7 +341,7 @@ int main(int argc, char **argv){
+
+ 2) If the counter you're going to measure is percent-based, the code will detect
+ the percent sign in its name and will attribute minimum (0%) and maximum (100%)
+- values automagically, as well the ¨%" sign to graph units.
++ values automagically, as well the ¨%" sign to graph units.
+
+ 3) OTOH, if the counter is "absolute", you'll have to provide the following
+ the counter unit - that is, the dimensions of the counter you're getting. Examples:
+
+From fcf68d702e590bd3e58fb7556f420330ddf0a0ae Mon Sep 17 00:00:00 2001
+From: Lorenz <12514511+RincewindsHat at users.noreply.github.com>
+Date: Thu, 27 Apr 2023 00:42:30 +0200
+Subject: [PATCH 2/2] Update plugins/check_nt.c
+
+Co-authored-by: datamuc <m at rbfh.de>
+---
+ plugins/check_nt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/check_nt.c b/plugins/check_nt.c
+index babe3b642..d73d83cea 100644
+--- a/plugins/check_nt.c
++++ b/plugins/check_nt.c
+@@ -341,7 +341,7 @@ int main(int argc, char **argv){
+
+ 2) If the counter you're going to measure is percent-based, the code will detect
+ the percent sign in its name and will attribute minimum (0%) and maximum (100%)
+- values automagically, as well the ¨%" sign to graph units.
++ values automagically, as well the "%" sign to graph units.
+
+ 3) OTOH, if the counter is "absolute", you'll have to provide the following
+ the counter unit - that is, the dimensions of the counter you're getting. Examples:
=====================================
debian/patches/21_check_pgsql_extra_output
=====================================
@@ -0,0 +1,46 @@
+From 9f15dac8e789a4b13d4f9e8897ee03fee84f494a Mon Sep 17 00:00:00 2001
+From: phowen <phowen at cisco.com>
+Date: Wed, 26 Apr 2017 13:40:27 +0100
+Subject: [PATCH] add extra output to pgsql check
+
+---
+ plugins/check_pgsql.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
+index c26cd439c..05fdc1568 100644
+--- a/plugins/check_pgsql.c
++++ b/plugins/check_pgsql.c
+@@ -517,7 +517,10 @@ print_help (void)
+ printf (" %s\n", _("connecting to the server. The result from the query has to be numeric."));
+ printf (" %s\n", _("Multiple SQL commands, separated by semicolon, are allowed but the result "));
+ printf (" %s\n", _("of the last command is taken into account only. The value of the first"));
+- printf (" %s\n\n", _("column in the first row is used as the check result."));
++ printf (" %s\n", _("column in the first row is used as the check result. If a second column is"));
++ printf (" %s\n", _("present in the result set, this is added to the plugin output with a"));
++ printf (" %s\n", _("prefix of \"Extra Info:\". This information can be displayed in the system"));
++ printf (" %s\n\n", _("executing the plugin."));
+
+ printf (" %s\n", _("See the chapter \"Monitoring Database Activity\" of the PostgreSQL manual"));
+ printf (" %s\n\n", _("for details about how to access internal statistics of the database server."));
+@@ -557,6 +560,7 @@ do_query (PGconn *conn, char *query)
+ PGresult *res;
+
+ char *val_str;
++ char *extra_info;
+ double value;
+
+ char *endptr = NULL;
+@@ -621,6 +625,12 @@ do_query (PGconn *conn, char *query)
+ printf ("|query=%f;%s;%s;;\n", value,
+ query_warning ? query_warning : "",
+ query_critical ? query_critical : "");
++ if (PQnfields (res) > 1) {
++ extra_info = PQgetvalue (res, 0, 1);
++ if (extra_info != NULL) {
++ printf ("Extra Info: %s\n", extra_info);
++ }
++ }
+ return my_status;
+ }
+
=====================================
debian/patches/series
=====================================
@@ -11,6 +11,8 @@
17_fix_exit_codes
18_check_mysql_fix_typo
19_check_nwstat_fix_typ
+20_chech_nt_fix_encoding
+21_check_pgsql_extra_output
# feature patches
30_check_radius_radcli_1.3.1_support
31_checl_mailq_separate_submission_queue
View it on GitLab: https://salsa.debian.org/nagios-team/monitoring-plugins/-/compare/17688c79c249154e46d9f66d82807e78950a4d26...3da21634e793f9b34c9df33d2d60a7baf2f3f39f
--
View it on GitLab: https://salsa.debian.org/nagios-team/monitoring-plugins/-/compare/17688c79c249154e46d9f66d82807e78950a4d26...3da21634e793f9b34c9df33d2d60a7baf2f3f39f
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-changes/attachments/20230510/dd5ff227/attachment-0001.htm>
More information about the pkg-nagios-changes
mailing list