summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-10-27 23:36:49 +0200
committerPaul Buetow <paul@buetow.org>2025-10-27 23:36:49 +0200
commit81d1550df55318beff8e9f762952a33daaa7c0cf (patch)
tree897e3c044c8e3bf5c9d71d98345fde9a645e8c7a /README.md
parent6352e8c33c1c22af382093d406d477d1530950db (diff)
feat: Add randomSpread and RunInterval to checks
This commit introduces two new optional parameters to the check configuration: - `randomSpread`: This parameter allows specifying a random sleep time up to N seconds before a check is executed. This is useful to avoid all checks running at the same time. - `RunInterval`: This parameter defines the minimum interval in seconds between two executions of a check. This is useful if gogios is run more frequently than a specific check should be. The `README.md` has been updated to document these new features. fix: Fix deadlock when skipping checks This commit also fixes a deadlock that occurred when a check was skipped due to the `RunInterval` setting. The `inputWg.Done()` was not being called, causing the main goroutine to wait forever. build: Replace Taskfile with Magefile The `Taskfile.yml` has been replaced with a `Magefile.go` to manage the build process. This provides more flexibility and is more idiomatic for Go projects.
Diffstat (limited to 'README.md')
-rw-r--r--README.md14
1 files changed, 10 insertions, 4 deletions
diff --git a/README.md b/README.md
index ae596e3..3c2e334 100644
--- a/README.md
+++ b/README.md
@@ -117,13 +117,15 @@ To configure Gogios, create a JSON configuration file (e.g., `/etc/gogios.json`)
"Plugin": "/usr/local/libexec/nagios/check_ping",
"Args": [ "-H", "www.foo.zone", "-4", "-w", "50,10%", "-c", "100,15%" ],
"Retries": 3,
- "RetryInterval": 10
+ "RetryInterval": 10,
+ "RandomSpread": 60
},
"Check ICMP6 www.foo.zone": {
"Plugin": "/usr/local/libexec/nagios/check_ping",
- "Args": [ "-H", "www.foo.zone", "-6", "-w", "50,10%", "-c", "100,15%" ]
+ "Args": [ "-H", "www.foo.zone", "-6", "-w", "50,10%", "-c", "100,15%" ],
"Retries": 3,
- "RetryInterval": 10
+ "RetryInterval": 10,
+ "RunInterval": 300
},
"www.foo.zone HTTP IPv4": {
"Plugin": "/usr/local/libexec/nagios/check_http",
@@ -157,6 +159,10 @@ If you want to execute checks only when another check succeeded (status OK), use
`Retries` and `RetryInterval` are optional check configuration parameters. In case of failure, Gogios will retry `Retries` times each `RetryInterval` seconds.
+`RandomSpread` is an optional check configuration parameter. It will cause a random sleep of up to N seconds (specified by config by each check) before the check is being executed. This is useful to avoid all checks running at the same time.
+
+`RunInterval` is an optional check configuration parameter. It defines the minimum interval in seconds between two executions of a check. This is useful if you run gogios more frequently than you want to run a specific check.
+
For remote checks, use the `check_nrpe` plugin. You also need to have the NRPE server set up correctly on the target host (out of scope for this document).
The `state.json` file mentioned above keeps track of the monitoring state and check results between Gogios runs, enabling Gogios only to send email notifications when there are changes in the check status.
@@ -202,4 +208,4 @@ My primary goal was to have a single email address for notifications and a simpl
This led me to create Gogios, a lightweight monitoring tool tailored to my specific needs. I chose the Go programming language for this project as it allowed me to refresh my Go programming skills and provided a robust platform for developing a fast and efficient monitoring tool.
-Gogios eliminates unnecessary features and focuses on simplicity, providing a no-frills monitoring solution for small-scale self-hosted servers and virtual machines. The result is a tool that is easy to configure, set up, and maintain, ensuring that monitoring your resources is as hassle-free as possible.
+Gogios eliminates unnecessary features and focuses on simplicity, providing a no-frills monitoring solution for small-scale self-hosted servers and virtual machines. The result is a tool that is easy to configure, set up, and maintain, ensuring that monitoring your resources is as hassle-free as possible. \ No newline at end of file