diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-07-06 22:49:04 +0200 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-07-06 22:49:04 +0200 |
commit | 92c7b91002b64187a67463e79ae3d306f5de923c (patch) | |
tree | 0a167d65d488fd07641789e45c6863e2b982fe43 /configure.ac | |
parent | bb4ce15997a3023c5c4f2bb434b37699797272da (diff) | |
parent | e63acdb83d9edcc8c1e244fc34043b4876b74f16 (diff) | |
download | monitoring-plugins-92c7b910.tar.gz |
Merge branch 'master' into refactor/check_load
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 50 |
1 files changed, 38 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 204fc6e3..ce140218 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -181,10 +181,10 @@ fi | |||
181 | 181 | ||
182 | # Finally, define tests if we use libtap | 182 | # Finally, define tests if we use libtap |
183 | if test "$enable_libtap" = "yes" ; then | 183 | if test "$enable_libtap" = "yes" ; then |
184 | EXTRA_TEST="test_utils test_disk test_tcp test_cmd test_base64" | 184 | EXTRA_TEST="test_utils test_tcp test_cmd test_base64" |
185 | AC_SUBST(EXTRA_TEST) | 185 | AC_SUBST(EXTRA_TEST) |
186 | 186 | ||
187 | EXTRA_PLUGIN_TESTS="tests/test_check_swap" | 187 | EXTRA_PLUGIN_TESTS="tests/test_check_swap tests/test_check_disk" |
188 | AC_SUBST(EXTRA_PLUGIN_TESTS) | 188 | AC_SUBST(EXTRA_PLUGIN_TESTS) |
189 | fi | 189 | fi |
190 | 190 | ||
@@ -796,7 +796,7 @@ elif ps axwo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \ | |||
796 | then | 796 | then |
797 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]" | 797 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]" |
798 | ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu etime comm args'" | 798 | ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu etime comm args'" |
799 | ac_cv_ps_format="%s %d %d %d %d %d %f %s %s %n" | 799 | ac_cv_ps_format="%s %u %d %d %d %d %f %s %s %n" |
800 | ac_cv_ps_cols=10 | 800 | ac_cv_ps_cols=10 |
801 | AC_MSG_RESULT([$ac_cv_ps_command]) | 801 | AC_MSG_RESULT([$ac_cv_ps_command]) |
802 | 802 | ||
@@ -1519,21 +1519,47 @@ then | |||
1519 | fi | 1519 | fi |
1520 | 1520 | ||
1521 | AC_PATH_PROG(PATH_TO_FPING,fping) | 1521 | AC_PATH_PROG(PATH_TO_FPING,fping) |
1522 | AC_PATH_PROG(PATH_TO_FPING6,fping6) | ||
1523 | 1522 | ||
1524 | AC_ARG_WITH(fping_command, | 1523 | AC_ARG_WITH(fping_command, |
1525 | ACX_HELP_STRING([--with-fping-command=PATH], | 1524 | ACX_HELP_STRING([--with-fping-command=PATH], |
1526 | [Path to fping command]), PATH_TO_FPING=$withval) | 1525 | [Path to fping command]), PATH_TO_FPING=$withval) |
1527 | AC_ARG_WITH(fping6_command, | 1526 | if test -n "$PATH_TO_FPING"; then |
1528 | ACX_HELP_STRING([--with-fping6-command=PATH], | ||
1529 | [Path to fping6 command]), PATH_TO_FPING6=$withval) | ||
1530 | |||
1531 | if test -n "$PATH_TO_FPING" | ||
1532 | then | ||
1533 | AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) | 1527 | AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) |
1534 | EXTRAS="$EXTRAS check_fping\$(EXEEXT)" | 1528 | EXTRAS="$EXTRAS check_fping\$(EXEEXT)" |
1535 | if test x"$with_ipv6" != xno && test -n "$PATH_TO_FPING6"; then | 1529 | |
1536 | AC_DEFINE_UNQUOTED(PATH_TO_FPING6,"$PATH_TO_FPING6",[path to fping6]) | 1530 | if test -z "$($PATH_TO_FPING --version)" ; then |
1531 | AC_MSG_NOTICE([failed to get version of fping]) | ||
1532 | else | ||
1533 | FPING_MAJOR_VERSION="$($PATH_TO_FPING --version | sed 's/.*fping: Version //' | sed 's/\..*//')" | ||
1534 | FPING_MINOR_VERSION="$($PATH_TO_FPING --version | sed 's/.*fping: Version //' | sed 's/.*\.//')" | ||
1535 | |||
1536 | if test $FPING_MAJOR_VERSION -eq 5 ; then | ||
1537 | if test $FPING_MINOR_VERSION -ge 3 ; then | ||
1538 | AC_DEFINE(FPING_VERSION_5_3_OR_HIGHER, "true", [fping is of version 5.3 or higher]) | ||
1539 | AC_MSG_NOTICE([fping is of version 5.3 or higher]) | ||
1540 | AC_DEFINE(FPING_VERSION_5_2_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
1541 | AC_MSG_NOTICE([fping is of version 5.2 or higher]) | ||
1542 | elif test $FPING_MINOR_VERSION -ge 2 ; then | ||
1543 | AC_DEFINE(FPING_VERSION_5_2_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
1544 | AC_MSG_NOTICE([fping is of version 5.2 or higher]) | ||
1545 | else | ||
1546 | AC_MSG_NOTICE([fping is of a version lower then 5.2]) | ||
1547 | fi | ||
1548 | |||
1549 | elif $FPING_MAJOR_VERSION > 5 ; then | ||
1550 | AC_DEFINE(FPING_VERSION_5_2_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
1551 | AC_MSG_NOTICE([fping is of version 5.2 or higher]) | ||
1552 | AC_DEFINE(FPING_VERSION_5_3_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
1553 | AC_MSG_NOTICE([fping is of version 5.3 or higher]) | ||
1554 | fi | ||
1555 | |||
1556 | if test "`fping --version | sed 's/.*fping: Version //'`" = "5.2" ; then | ||
1557 | AC_DEFINE(FPING_VERSION, "5.2", [the version of fping available]) | ||
1558 | AC_MSG_NOTICE([fping version: 5.2]) | ||
1559 | elif test "`fping --version | sed 's/.*fping: Version //'`" = "5.3"; then | ||
1560 | AC_DEFINE(FPING_VERSION, "5.3", [the version of fping available]) | ||
1561 | AC_MSG_NOTICE([fping version: 5.3]) | ||
1562 | fi | ||
1537 | fi | 1563 | fi |
1538 | else | 1564 | else |
1539 | AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) | 1565 | AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) |