Commit graph

41 commits

Author SHA1 Message Date
b8506e8a3f
fix(matches): split command into arguments 2024-07-20 22:31:28 +02:00
9333c6ff80
chore: allow karrick/golf to be replaced, pending PR result 2024-07-20 22:26:48 +02:00
402f7f3c11
refactor(perfdata): split the range parser into many functions 2024-07-20 22:26:35 +02:00
2b58a27cc0
refactor(matches): split the external program handling code into more functions 2024-07-20 21:51:01 +02:00
09df5aa44e
feat(cmd): add output matcher plugin 2024-07-20 20:47:42 +02:00
1f9be057b6
fix(pkg): fix using ~ as the lower bound for RangeMinMax 2024-07-20 20:33:15 +02:00
ee05d6f004
feat(pkg): add status check method to PerfData 2024-07-20 19:12:59 +02:00
3263d8c583
refactor(pkg): move Status to a separate module 2024-07-20 18:58:27 +02:00
7209591e08
feat(pkg): add Range.Contains() method 2024-07-20 18:42:18 +02:00
6d44df6216
fix(pkg): range parser supports single numbers
These are `[0:X]` ranges, according to the Nagios doc.
2024-07-20 18:17:53 +02:00
7c8c624b17
fix(pkg): fix type issue for rps* constants in perfdata 2024-07-20 18:12:01 +02:00
1a35167eab
feat(pkg): thresholds on perfdata can be cleared using Set...(nil) 2024-07-20 18:11:06 +02:00
14c7a0e5e8
feat(pkg): add parser for perf data ranges 2024-07-20 16:22:22 +02:00
c87f31d89d
chore: replace golf with a fork 2024-07-20 15:28:16 +02:00
517bb2073a
fix(main): fix syntax help text 2024-07-20 11:32:39 +02:00
9fac656cdf
fix(main): exit on syntax error
All checks were successful
Run tests and linters / test (pull_request) Successful in 44s
Run tests and linters / build (pull_request) Successful in 46s
Run tests and linters / lint (pull_request) Successful in 1m23s
Run tests and linters / test (push) Successful in 46s
Run tests and linters / build (push) Successful in 48s
Run tests and linters / lint (push) Successful in 1m21s
2024-07-20 10:11:31 +02:00
78af496fe9 refactor: make internals easier to test and add unit tests (#2)
All checks were successful
Run tests and linters / test (push) Successful in 44s
Run tests and linters / build (push) Successful in 47s
Run tests and linters / lint (push) Successful in 1m20s
This PR refactors most of the internals to make them easier to test (and also because the names didn't make sense). It adds unit tests for all internal components.

Reviewed-on: #2
Co-authored-by: Emmanuel BENOÎT <tseeker@nocternity.net>
Co-committed-by: Emmanuel BENOÎT <tseeker@nocternity.net>
2024-07-20 10:01:05 +02:00
dcd732cc34
chore: fix test runner
All checks were successful
Run tests and linters / test (pull_request) Successful in 42s
Run tests and linters / build (pull_request) Successful in 43s
Run tests and linters / lint (pull_request) Successful in 1m19s
Run tests and linters / test (push) Successful in 41s
Run tests and linters / build (push) Successful in 42s
Run tests and linters / lint (push) Successful in 1m23s
2024-07-20 09:05:17 +02:00
2fa0e37900 refactor: reorganize project in order to include automation (#1)
All checks were successful
Run tests and linters / test (push) Successful in 43s
Run tests and linters / build (push) Successful in 41s
Run tests and linters / lint (push) Successful in 1m22s
Reviewed-on: #1
Co-authored-by: Emmanuel BENOÎT <tseeker@nocternity.net>
Co-committed-by: Emmanuel BENOÎT <tseeker@nocternity.net>
2024-07-19 22:01:34 +02:00
8feb34bbe6
fix(check_zone_serial): use net.JoinHostPort 2023-11-02 11:42:19 +01:00
bad82cf32d
README - Fix Markdown bug 2023-11-02 10:24:00 +01:00
26ac3da54a README - Section about check_zone_serial 2021-02-27 11:33:28 +01:00
f67dd244a4 check_zone_serial added
This pluging queries a pair of DNSs for a zone's SOA record and ensures
that serials received from both servers match.
2021-02-27 11:26:34 +01:00
31850c9901 Plugin - Accept format strings+data for AddLine
Most calls were being made from fmt.Sprintf() anyway, so it was clear
this required formatted input.
2021-02-27 10:54:40 +01:00
a856b449a8 README.md added 2021-02-19 19:28:25 +01:00
14e1a764ae Changed project URL 2021-02-19 19:10:40 +01:00
8f566fa955 check_ssl_certificate - Fixed map loop syntax 2021-02-19 17:39:08 +01:00
08e8ff920a check_ssl_certificate - Generate list of supported StartTLS procols 2021-02-19 17:37:57 +01:00
5badf33e31 check_ssl_certificate - Support for ManageSieve/STARTTLS 2021-02-19 17:33:13 +01:00
65239769a0 check_ssl_certificate - SMTP STARTTLS support
* Refactored code so that obtaining TLS certificates from server can
  have different implementations
* Added SMTP-specific implementation that will send a HELO followed
  by a STARTTLS.
2021-02-19 16:53:34 +01:00
55c4a7b3a5 check_ssl_certificate - Handle the case of actually expired certificates 2021-02-19 15:58:40 +01:00
ffe98f702b Build script - Build for x86 and amd64 2021-02-19 13:55:27 +01:00
97f0cf48bb check_ssl_certificate - Comments 2021-02-19 13:41:50 +01:00
830d51365f check_ssl_certificate - Check additional names 2021-02-19 13:21:06 +01:00
ac1eacd2a5 plugin - SetState no longer resets additional text 2021-02-19 13:18:21 +01:00
fc5f4c1638 plugin - "Fixed" comments to silence go-lint 2021-02-19 12:47:00 +01:00
916dc35de6 Use golf for command line parsing
* Split command line flags data from the main program data structure
* Use golf to support GNU-style flags
* Added -h/--help flag
2021-02-19 10:53:07 +01:00
2c5d27684a Cleaner SSL check program
* Split off the progam into various functions
* Pass the program's data (plugin, certificate) through a single
  structure
2021-02-19 10:38:18 +01:00
cdcb18821f Additional comments; pointer use where possible 2021-01-07 20:55:10 +01:00
b86fdf53b9 Short documentation for the plugin state code 2021-01-03 12:03:10 +01:00
66a1b017be Initial import of lib + certificate validity checker 2021-01-03 10:33:21 +01:00