Commit Graph

14 Commits

Author SHA1 Message Date
Phil Porada 365c9af463
Replace deprecated iotuil.ReadAll with io.ReadAll (#6678)
Per [1]: 
> Deprecated: As of Go 1.16, this function (ioutil.ReadAll) simply calls
io.ReadAll.

1. https://pkg.go.dev/io/ioutil#ReadAll
2023-02-21 11:07:55 -08:00
Preston Locke 7d3fc60271
observer: Monitors probe immediately instead of waiting a full duration (#6594)
Do work on startup to limit the likelihood of post-deployment runtime panics.
2023-01-24 16:45:19 -05:00
lenaunderwood22 55e5a24e7d
observer: TLS prober check root optionally (#6569)
Modify the TLS prober to only check the root if one is provided.
2023-01-24 12:16:40 -05:00
lenaunderwood22 5016908905
observer: Fix nil pointer in TLS prober (#6591)
Initialize `Intermediates` field in `VerifyOptions`.
2023-01-20 19:28:11 -05:00
lenaunderwood22 b21f9b7976
Register TLS prober (#6570)
When attempting to add TLS probe monitoring, got the error `TLS is not a
registered Prober type`. This PR adds TLS Prober to `observer.go` to
complete its registration and adds TLS Prober to the observer README.

Co-authored-by: Samantha <hello@entropy.cat>
2023-01-11 14:01:41 -05:00
lenaunderwood22 f2bb0e42f1
boulder-observer: Add TLS prober (#6480)
Add a new kind of prober to boulder-observer which makes a TLS
connection to the target hostname and expects the certificate presented
for the TLS handshake to have certain properties, such as being valid,
expired, or revoked.

Part of #5927
2022-12-12 13:54:31 -08:00
lenaunderwood22 a90d9bff8d
add insecure option to HTTP Prober (#6514)
Adding an insecure option to HTTP prober so that it can still check the
status of sites that we expect to be insecure (e.g. expired sites).

Co-authored-by: Aaron Gable <aaron@aarongable.com>
2022-12-05 12:23:04 -08:00
Preston Locke 8477ba38e3
boulder-observer: Add a CRL prober type (#6349)
This PR is a follow-up to #6277 and #6290 to add a new prober type to
boulder-observer for monitoring CRLs, making use of the new prober-specific
metrics capability to define the following new metrics:

- `obs_crl_this_update` the Unix timestamp of the CRL's thisUpdate value
- `obs_crl_next_update` the Unix timestamp of the CRL's nextUpdate value
- `obs_crl_revoked_cert_count` the number of certificates listed in the CRL

**Configuration:** Each defined CRL monitor takes a single configuration option,
a URL that specifies the location of the CRL to monitor.

**Metrics:** The three CRL-specific metrics described above are only published
at /metrics if at least one valid monitor is defined in the config.yml. The
metrics have a single label `url` that is set to the URL configured for the
monitor
2022-09-15 11:44:56 -07:00
Preston Locke 647eb3f2fa
boulder-observer: Add support for prober specific metrics (#6290) 2022-09-02 10:40:03 -07:00
Aaron Gable 1a6f7154d8
Update yaml from v2.4.0 to v3.0.1 (#6146)
The gopkg.in/yaml.v2 package has a potential crash when
parsing malicious input. Although we only use the yaml
package to parse trusted configuration, update to v3 anyway.
2022-06-14 13:53:58 -07:00
Aaron Gable 305ef9cce9
Improve error checking paradigm (#5920)
We have decided that we don't like the if err := call(); err != nil
syntax, because it creates confusing scopes, but we have not cleaned up
all existing instances of that syntax. However, we have now found a
case where that syntax enables a bug: It caused readers to believe that
a later err = call() statement was assigning to an already-declared err
in the local scope, when in fact it was assigning to an
already-declared err in the parent scope of a closure. This caused our
ineffassign and staticcheck linters to be unable to analyze the
lifetime of the err variable, and so they did not complain when we
never checked the actual value of that error.

This change standardizes on the two-line error checking syntax
everywhere, so that we can more easily ensure that our linters are
correctly analyzing all error assignments.
2022-02-01 14:42:43 -07:00
Aaron Gable ab79f96d7b
Fixup staticcheck and stylecheck, and violations thereof (#5897)
Add `stylecheck` to our list of lints, since it got separated out from
`staticcheck`. Fix the way we configure both to be clearer and not
rely on regexes.

Additionally fix a number of easy-to-change `staticcheck` and
`stylecheck` violations, allowing us to reduce our number of ignored
checks.

Part of #5681
2022-01-20 16:22:30 -08:00
Andrew Gabbitas b5aab29407
Make boulder-observer HTTP User-Agent configurable (#5484)
- Make User-Agent configurable in config file
- Fix README example
- Add tests
2021-06-14 11:08:18 -06:00
Samantha 97e393d2e7
boulder-observer (#5315)
Add configuration driven Prometheus black box metric exporter
2021-03-29 12:56:54 -07:00