uptimecurl
Basic monitoring tool designed for rapid deployment and simple results.
Scheduled monitoring, dashboards, alerts and other advanced features are out of scope. Instead consider tools like crontab, Cockpit, Grafana or Zabbix.
Usage
Usage: uptimecurl [OPTIONS]
Basic monitoring tool designed for rapid deployment and simple results.
Define tests in the DEFINITION file and template in the TEMPLATE file.
Report is generated at the OUTPUT path.
Instead of command-line parameters you can use the environment variables
UPTIMECURL_DEFINITION, UPTIMECURL_TEMPLATE and UPTIMECURL_OUTPUT. These
can be defined in a .env file in the working directory.
Options:
--definition FILE List of test definitions (YAML).
--template FILE Template to generate report from test results (Mustache).
--output FILE Output path for report (typically HTML).
--help Show this message and exit.
Sample definition
example_http:
type: http_ok
parameters:
- http://en.wikipedia.org
example_port:
type: port_ok
parameters:
- en.wikipedia.org
- 443
Sample template
See https://mustache.github.io/mustache.5.html for template language.
<tbody>
{{#data}}
<tr>
<td title="{{timestamp}}">
{{name}}
</td>
<td title="{{parameters}}">
{{type}}
</td>
<td title="{{message}}">
{{success_code}}
</td>
</tr>
{{/data}}
</tbody>
Sample report
Run uptimecurl without parameters to generate this sample report in HTML
(hover or view source on each cell for more detail):
| Name | Test | Result |
|---|---|---|
| example_http | http_ok | ❌ |
| example_port | port_ok | 💚 |
Test types
http_ok
test_name:
type: http_ok
parameters:
- https://example.com/path
Perform an HTTP request against any URL (parameter 0).
Return 💚 if we get a 200 OK response, ❌ otherwise.
Note that we expect strictly a 200 OK reponse. Redirects and other values
will result in a failure. (See the sample report for an example of a failure.)
port_ok
test_name:
type: port_ok
parameters:
- domain.com
- 1234
Attempt to connect to domain:port (parameter 0, parameter 1).
Return 💚 if successful, ❌ otherwise.
Note that an open port does not guarantee that the underlying application is working, just that the server is up and correctly configured.
Development environment
Install prerequisites
- Python 3.10
- pdm
- make
Instructions
- Fork the upstream repository.
git clone [fork-url]cd [project-folder]- Run
make developto initialise your development environment.
You can use any text editor or IDE that supports virtualenv / pdm. See the Makefile for toolchain details.
Please make test and make lint before submitting changes.
Make targets
USAGE: make [target]
help : Show this message.
develop : Set up Python development environment.
run : Run from source.
clean : Remove all build artefacts.
test : Run tests and generate coverage report.
lint : Fix or warn about linting errors.
build : Clean, test, lint, then generate new build artefacts.
publish : Upload build artefacts to PyPI.
Sharing and contributions
uptimecurl
https://lofidevops.neocities.org
Copyright 2020 David Seaward and contributors
SPDX-License-Identifier: AGPL-3.0-or-later
Shared under AGPL-3.0-or-later. We adhere to the Contributor Covenant 2.1, and certify origin per DCO 1.1 with a signed-off-by line. Contributions under the same terms are welcome.
Submit security and conduct issues as private tickets. Sign commits with
git commit --signoff. For a software bill of materials run reuse spdx. For
more details see CONDUCT, COPYING and CONTRIBUTING.
Metadata
Release files for uptimecurl 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| uptimecurl-0.1.5.tar.gz | 34.6 kB | Without provenance | Details for uptimecurl-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uptimecurl-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for uptimecurl-0.1.5-py3-none-any.whl |
Total release size: 78.4 kB
Release files / uptimecurl-0.1.5.tar.gz
| Download URL | uptimecurl-0.1.5.tar.gz |
|---|---|
| Size | 34.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
786fa6b247f0181028b8c67e391f0a291b07c0a09ac78f9719d08b7a03f8db49
|
|
BLAKE2b-256 checksum How to use checksums |
9167a3ae3fceeea8315fb45d4c72abb1f114680f951508f77d06150edabd02f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.5.2 CPython/3.10.6
|
Release files / uptimecurl-0.1.5-py3-none-any.whl
| Download URL | uptimecurl-0.1.5-py3-none-any.whl |
|---|---|
| Size | 43.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb929caaf328e10d941a37ad197346e5ebebf1d8e7d1670955d84512d987f889
|
|
BLAKE2b-256 checksum How to use checksums |
a50c792ec8cd42f764cfa215087ff5583d1493814bded400616466d0c0d5e2f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.5.2 CPython/3.10.6
|
Security for uptimecurl 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.