Lorenz Kästle
6a9922f59d
OK summary for ntp_peer, ntp_time and users
2026-06-03 16:07:44 +02:00
Dirk Mueller
07a249a5d7
Fix typo in enum MP_PARSING_SUCCES(S) ( #2233 )
2026-02-16 11:22:39 +01:00
Lorenz Kästle
0f0865c910
Make IPv6 unconditional ( #2219 )
...
Tests Debian:Testing and Fedora:Rawhide / Running unit and integrationt tests (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running rpm build test on fedora:rawhide (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Spellcheck / codespell (push) Has been cancelled
Tests / Running unit and integrationt tests (push) Has been cancelled
Tests / Running rpm build test on almalinux:9 (push) Has been cancelled
Tests / Running rpm build test on fedora:latest (push) Has been cancelled
Tests / Running rpm build test on rockylinux:8 (push) Has been cancelled
This commits removes the detection of IPv6 availability.
The IPv6 code in the plugins is used unconditionally now.
2026-02-06 12:59:58 +01:00
Alvar
cef40299a9
OpenBSD: pledge(2) some network-facing checks ( #2225 )
...
OpenBSD's pledge(2) system call allows the current process to
self-restrict itself, being reduced to promised pledges. For example,
unless a process says it wants to write to files, it is not allowed to
do so any longer.
This change starts by calling pledge(2) in some network-facing checks,
removing the more dangerous privileges, such as executing other files.
My initial motivation came from check_icmp, being installed as a setuid
binary and (temporarily) running with root privileges. There, the
pledge(2) calls result in check_icmp to only being allowed to interact
with the network and to setuid(2) to the calling user later on.
Afterwards, I went through my most commonly used monitoring plugins
directly interacting with the network. Thus, I continued with
pledge(2)-ing check_curl - having a huge codebase and all -,
check_ntp_time, check_smtp, check_ssh, and check_tcp.
For most of those, the changes were quite similar: start with
network-friendly promises, parse the configuration, give up file access,
and proceed with the actual check.
2026-02-06 12:58:38 +01:00
Lorenz Kästle
3ae751ed67
Fix check_ntp_time without a socket ( #2196 )
...
CodeQL / Analyze (push) Waiting to run
Spellcheck / codespell (push) Waiting to run
Tests / Running unit and integrationt tests (push) Waiting to run
Tests / Running rpm build test on almalinux:9 (push) Waiting to run
Tests / Running rpm build test on fedora:latest (push) Waiting to run
Tests / Running rpm build test on rockylinux:8 (push) Waiting to run
In the previous commit I unintentionally introduced an error
through symbol shadowing.
This should fix check_ntp_time when the target address
is a network address.
2025-12-04 13:24:14 +01:00
Lorenz Kästle
2f96b82c9b
check_ntp_time/check_ntp_peer: unix socket handling ( #2187 )
...
CodeQL / Analyze (push) Waiting to run
Spellcheck / codespell (push) Waiting to run
Tests / Running unit and integrationt tests (push) Waiting to run
Tests / Running rpm build test on almalinux:9 (push) Waiting to run
Tests / Running rpm build test on fedora:latest (push) Waiting to run
Tests / Running rpm build test on rockylinux:8 (push) Waiting to run
* check_ntp_time/check_ntp_peer: unix socket handling
* No tests for check_ntp since it is deprecated
2025-11-28 10:52:39 +01:00
Lorenz Kästle
71e0d5e073
check_ntp_time: add cli option for output format
2025-11-05 12:19:20 +01:00
Lorenz Kästle
7b226257b7
check_ntp_time: reduce number of significant bits a bit
2025-11-05 10:42:43 +01:00
Lorenz Kästle
cadcfaecbe
check_ntp_time: fix time-offset argument and description
2025-11-05 10:42:12 +01:00
Lorenz Kästle
16daa06e43
check_ntp_time: actually accept offset if known
2025-11-05 10:41:34 +01:00
Lorenz Kästle
b35853ee4e
check_ntp_time: implement modern output
2025-11-04 12:08:59 +01:00
Lorenz Kästle
802e46f8ea
Run clang-format again
2025-09-15 12:59:37 +02:00
Lorenz Kästle
9ea0bf23df
Refactor check_ntp_time
2025-03-12 01:41:48 +01:00
Lorenz Kästle
b770cc0f42
check_ntp_time: general refactoring
2025-03-12 01:23:50 +01:00
Lorenz Kästle
59156e79c9
check_ntp_time: clang-format
2025-03-12 01:08:18 +01:00
RincewindsHat
0700aacf7c
check_ntp_time: more local variables, style fixes
2024-10-31 13:23:31 +01:00
RincewindsHat
7d706b15d0
check_ntp_time: do not export local variables
2024-10-31 13:11:27 +01:00
RincewindsHat
d078e8037f
check_ntp_time: update copyright
2024-10-31 13:11:10 +01:00
RincewindsHat
395ab8f58b
check_ntp_time: clang-format
2024-10-31 13:09:57 +01:00
RincewindsHat
531e0f9427
check_ntp_time: Use C99 booleans
2023-10-19 10:04:24 +02:00
RincewindsHat
a3d76fed02
Revert "check_ntp_time: Use C99 booleans"
...
This reverts commit c849536609 .
2023-10-19 09:53:37 +02:00
RincewindsHat
c849536609
check_ntp_time: Use C99 booleans
2023-10-18 17:15:19 +02:00
Jan Wagner
0f3703e641
Fix a lot of typos reported by codespell
2023-04-14 18:35:00 +00:00
Jan Wagner
1723a3c761
It's useful to use 'useful' instead of 'usefull'
2016-11-18 11:47:20 +01:00
Sven Nierlein
06fdc55195
Merge pull request #1313 from waja/check_ntp_time_remove_unused_variables
...
check_ntp_time: remove unused variables
2016-11-07 23:06:38 +01:00
Sven Nierlein
edca257e20
use unknown exit code for help/version in plugins
...
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-04 19:24:30 +02:00
Sebastian Herbszt
2daf38b0aa
check_ntp_time: remove unused variables
...
Remove unused variables.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
2014-12-27 15:28:12 +01:00
abrist
6f3d5825b2
check_ntp_time.c - Cleaned up usage and added a note
...
Closes #907
Closes #1184
2014-07-29 14:24:21 +02:00
Jan Wagner
a941219b41
check_ntp_time: adding offset option
...
Not sure if this is of use or not - we have a strange requirement to run
certain servers 5 minutes fast. I've added a switch to the check_ntp_time
to allow for this offset.
Thanks to Patrick McAndrew.
2014-07-29 14:23:17 +02:00
Jan Wagner
ccecba33a2
Fixing bug in average calculation (Submitted by Lars)
...
The more important change: A fix for a bug which caused the check_ntp_time
and check_ntp_time check to always take the first response from ntp and not
the avarage since "j" is not increased anywhere. "i" should be used there
instead.
Partly Closes #956 and Closes #1166
Closes : #1089
2014-01-24 18:20:08 +01:00
Jan Wagner
c5dc81cd28
Making AVG_NUM configurable by compiler define (Submitted by Lars)
...
A minor change which makes the AVG_NUM configurable by compiler define.
Partly Closed #956 and Closes #1166
2014-01-24 17:55:57 +01:00
Thomas Guyot-Sionnest
11cf54ca78
Merge branch 'rename'
2014-01-21 07:59:07 -05:00
Spenser Reinhardt
212575b858
plugins/*.c: Alterations for timeout messages.
...
.c file changes for misleading timeout messages in help functions. Solution to pull request #1209 tracker by awiddersheim.
Files: plugins/check_apt.c, plugins/check_by_ssh.c, plugins/check_dbi.c, plugins/check_dig.c, plugins/check_disk.c, plugins/check_dns.c, plugins/check_game.c, plugins/check_http.c, plugins/check_ldap.c, plugins/check_ntp.c, plugins/check_ntp_peer.c, plugins/check_ntp_time.c, plugins/check_nwstat.c, plugins/check_overcr.c, plugins/check_pgsql.c, plugins/check_ping.c, plugins/check_procs.c, plugins/check_radius.c, plugins/check_real.c, plugins/check_smtp.c, plugins/check_snmp.c, plugins/check_ssh.c, plugins/check_tcp.c, plugins/check_time.c, plugins/check_ups.c, plugins/negate.c
2014-01-21 11:33:45 +01:00
Holger Weiss
c3e756a855
Capitalize "Monitoring" when it's the first word
2014-01-20 03:12:50 +01:00
Monitoring Plugins Development Team
63734f52ab
Project rename initial commit.
...
This is an initial take at renaming the project to Monitoring Plugins.
It's not expected to be fully complete, and it is expected to break
things (The perl module for instance). More testing will be required
before this goes mainline.
2014-01-19 14:18:47 -05:00
Sven Nierlein
6fde27e478
check_ntp(_time): don't die on connect errors
...
connect errors may happen if clients check agains dual
stacked ipv4/6 ntp servers.
2012-11-28 13:51:16 +01:00
Sven Nierlein
24772e755e
unified ipv4/6 usage and help text
2012-11-28 11:03:11 +01:00
Anders Kaseorg
028d50d6f9
Die when asprintf fails
...
Fixes many instances of
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-06-29 13:39:11 +02:00
Thomas Guyot-Sionnest
eaf3cb27f4
Add newline after "Usage:" in --help
2010-04-22 08:57:14 -04:00
Thomas Guyot-Sionnest
884aee0667
Standardize the extra-opts notes
2010-04-21 23:29:18 -04:00
Thomas Guyot-Sionnest
25d1ee331d
Fix translations when extra-opts aren't enabled
...
Bug #2832884 reported problem with translations outputting pot file
headers. This is caused by "" matching the header of the translation
files.
This patch moves gettext macros inside utils macros and update some
french translations.
2010-04-14 08:33:06 -04:00
Thomas Guyot-Sionnest
6fbd14fea5
Removing CVS/SVN tags and replacing with git-based versioning
...
For contrib/, full tags have been imported from subversion
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-23 05:38:47 +00:00
Thomas Guyot-Sionnest
caa8bd6423
Bulk EOL cleanup
...
$ git diff --ignore-space-change|diffstat
0 files changed
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19 06:45:18 +00:00
Thomas Guyot-Sionnest
122610e373
check_ntp_peer/check_ntp_time used to show port in --help but ignored the argument - now implemented.
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2051 f882894a-f735-0410-b71e-b25c423dba1c
2008-09-01 14:04:22 +00:00
Thomas Guyot-Sionnest
44f8455b2c
Added support for --extra-opts in all C plugins (disabled by default, see configure --help)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1991 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-07 10:02:42 +00:00
Thomas Guyot-Sionnest
dbd7b90170
Use UT_THRESHOLDS_NOTES in all plugins
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1986 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-29 09:01:48 +00:00
Thomas Guyot-Sionnest
fa4efcdf6d
Bump plugins/ to GPLv3 (check_apt to check_nwstat)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1916 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-30 10:53:47 +00:00
Thomas Guyot-Sionnest
34cfb0c103
Fix bugs and flaws in best offset server selection of check_ntp_time and (deprecated) check_ntp
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1909 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-29 08:54:48 +00:00
Thomas Guyot-Sionnest
08d81dc7bd
Fix help text of check_ntp_* (Bug #1880095 )
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1908 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-26 15:55:03 +00:00
Thomas Guyot-Sionnest
b5d3997aa3
Fix Bug #1862300 : check_ntp_time segfault in 1.4.11 (Also apply to check_ntp)
...
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1887 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-05 14:09:29 +00:00