A Python client for Cronus alerts
Project description
cronus-alert
The easiest way to get push notifications for events that you define
This repo contains the cronus-alert package in
- Javascript
- Go
- Python
All packages require an API key from cronusmonitoring.com
Javascript
1. Install
npm i cronus-alert
2. Example usage
function main() {
// Set API Key to an environment variable
const cronusAlert = new CronusAlert(process.env.CRONUS_API_TOKEN);
cronusAlert
.FireAlert(
"The system is down", // Summary
"Someone forgot to lock the gate", // Description
Status.Firing // Optional status
)
.then((resp) => {
console.log(resp.data); // API response
})
.catch((err) => {
console.error(err); // network error
});
}
main();
Go
1. Install
go get github.com/mperkins808/cronus-alert/go/pkg/cronusalert
2. Example usage
func main() {
client := cronusalert.NewCronusAlertClient(os.Getenv("CRONUS_API_KEY"))
alert := cronusalert.Alert{
Summary: "Issue detected in server",
Description: "Failing to read database transactions",
Status: cronusalert.FIRING,
}
err := client.Fire(alert)
if err != nil {
// handle error
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cronusalert-0.1.0.tar.gz
(2.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cronusalert-0.1.0.tar.gz.
File metadata
- Download URL: cronusalert-0.1.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce71cc621ab9f0564e72ad5dda7be7bdf2ab63f1cae410f9149decd8e777b068
|
|
| MD5 |
4b0fd874677facafb611c12e83d6657e
|
|
| BLAKE2b-256 |
e2d56e1a8fc64bb338674bac791e94062615ad9f7f0180c0cbd011fdd268c452
|
File details
Details for the file cronusalert-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cronusalert-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
631bb53602222ff759419a0bd1f8571af2d6f079712e141b16c7360bc675132a
|
|
| MD5 |
a82688ff38d8c4e133440a1e1b29c4b9
|
|
| BLAKE2b-256 |
64afed3ffa141033fe7915be62a8e32610666bab26a10c12da5fb02bf10050ce
|