diff options
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/tallyman.1 | 7 | ||||
-rw-r--r-- | src/tallyman.c | 8 |
4 files changed, 20 insertions, 4 deletions
@@ -1,8 +1,13 @@ | |||
1 | tallyman -- history of user-visible changes. 2021-02-05 | 1 | tallyman -- history of user-visible changes. 2021-11-22 |
2 | See the end of file for copying conditions. | 2 | See the end of file for copying conditions. |
3 | 3 | ||
4 | Please send tallyman bug reports to <gray+tallyman@gnu.org.ua> | 4 | Please send tallyman bug reports to <gray+tallyman@gnu.org.ua> |
5 | 5 | ||
6 | Version 1.4, 2021-11-22 | ||
7 | |||
8 | * tallyman: if passed empty service ID, don't attempt to contact the collector | ||
9 | |||
10 | |||
6 | Version 1.3, 2021-02-05 | 11 | Version 1.3, 2021-02-05 |
7 | 12 | ||
8 | * New statement "snmp-client-config" | 13 | * New statement "snmp-client-config" |
diff --git a/configure.ac b/configure.ac index 44d34b8..7e10ffe 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -5,7 +5,7 @@ | |||
5 | # There is NO WARRANTY, to the extent permitted by law. | 5 | # There is NO WARRANTY, to the extent permitted by law. |
6 | 6 | ||
7 | AC_PREREQ([2.69]) | 7 | AC_PREREQ([2.69]) |
8 | AC_INIT([tallyman], [1.3], [gray+tallyman@gnu.org]) | 8 | AC_INIT([tallyman], [1.4], [gray+tallyman@gnu.org]) |
9 | AC_CONFIG_SRCDIR([src/tallyman.c]) | 9 | AC_CONFIG_SRCDIR([src/tallyman.c]) |
10 | AC_CONFIG_HEADERS([config.h]) | 10 | AC_CONFIG_HEADERS([config.h]) |
11 | AM_INIT_AUTOMAKE([1.15 foreign]) | 11 | AM_INIT_AUTOMAKE([1.15 foreign]) |
diff --git a/src/tallyman.1 b/src/tallyman.1 index 5e43695..2f9d794 100644 --- a/src/tallyman.1 +++ b/src/tallyman.1 | |||
@@ -1,4 +1,4 @@ | |||
1 | .TH TALLYMAN 1 "October 10, 2020" "TALLYMAN" "Tallyman User Reference" | 1 | .TH TALLYMAN 1 "November 22, 2021" "TALLYMAN" "Tallyman User Reference" |
2 | .SH NAME | 2 | .SH NAME |
3 | tallyman \- health state collector for docker containers | 3 | tallyman \- health state collector for docker containers |
4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
@@ -75,6 +75,11 @@ In the absense of the | |||
75 | option, | 75 | option, |
76 | .B tallyman | 76 | .B tallyman |
77 | will send statistics to the container's default gateway, port 8990. | 77 | will send statistics to the container's default gateway, port 8990. |
78 | .PP | ||
79 | As a special case, if given empty string as \fISRVID\fR, | ||
80 | \fBtallyman\fR will run the supplied command via a call to | ||
81 | .BR execv (3), | ||
82 | without making any attempt to contact the collector. | ||
78 | .SS Diagnostics | 83 | .SS Diagnostics |
79 | The program attempts to be as transparent as it is reasonable. It | 84 | The program attempts to be as transparent as it is reasonable. It |
80 | will display diagnostic messages on the standard error if it is | 85 | will display diagnostic messages on the standard error if it is |
diff --git a/src/tallyman.c b/src/tallyman.c index 1536fcd..5803cb5 100644 --- a/src/tallyman.c +++ b/src/tallyman.c | |||
@@ -270,10 +270,16 @@ main(int argc, char **argv) | |||
270 | service_id = *argv; | 270 | service_id = *argv; |
271 | argc--; | 271 | argc--; |
272 | argv++; | 272 | argv++; |
273 | 273 | ||
274 | if (argc == 0) | 274 | if (argc == 0) |
275 | usage_error("no program given"); | 275 | usage_error("no program given"); |
276 | 276 | ||
277 | if (*service_id == 0) { | ||
278 | execvp(argv[0], argv); | ||
279 | system_error(errno, "failed to run %s", argv[0]); | ||
280 | exit(127); | ||
281 | } | ||
282 | |||
277 | if (!hostname) { | 283 | if (!hostname) { |
278 | if (get_hostname(&hostname)) { | 284 | if (get_hostname(&hostname)) { |
279 | system_error(errno, "hostname"); | 285 | system_error(errno, "hostname"); |