-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a way to export labels with content matched by the probe (#1284)
* Add a way to export labels with content matched by the probe. Produces scraping values like these: ``` probe_content{ssh_comments="FreeBSD-20240806",ssh_version="OpenSSH_9.7"} 1 ``` Signed-off-by: Lapo Luchini <[email protected]> * Update name of metric as suggested upstream. ``` # HELP probe_expect_info Explicit content matched # TYPE probe_expect_info gauge probe_expect_info{ssh_comments="FreeBSD-20240806",ssh_version="OpenSSH_9.7"} 1 ``` Signed-off-by: Lapo Luchini <[email protected]> * Add some documentation for new feature. Signed-off-by: Lapo Luchini <[email protected]> * Refactor new feature in a function. Signed-off-by: Lapo Luchini <[email protected]> * Probe expect info test. Signed-off-by: Lapo Luchini <[email protected]> * Refactor to pass bytes directly, to ease unit test. This involves an unnecessary copy, but I didn't find the proper way to avoid it. Signed-off-by: Lapo Luchini <[email protected]> * Unit test for new `probeExpectInfo` function. Signed-off-by: Lapo Luchini <[email protected]> --------- Signed-off-by: Lapo Luchini <[email protected]>
- Loading branch information
1 parent
8003b91
commit cbfad77
Showing
5 changed files
with
105 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters