skylog python sdk
Project description
skylog-sdk
- Github repository: https://github.com/vahidtwo/skylog-sdk/
- Documentation https://vahidtwo.github.io/skylog-sdk/
Python SDK for Skylog Integration
Skylog is a robust service designed for seamless integration with various platforms like Sentry, Telegram, and more, enabling the efficient transmission of logs and rapid identification of issues.
This Python SDK facilitates easy interaction with Skylog services, allowing users to:
- fire alert
- stop alert
- notify
How to install
install from gitlab
pip install skylog-sdk
Setup and Configuration
-
Environment Variables: Configure the following variables in your project environment:
DEFAULT_SKY_LOG_ALERTING_TELEGRAM_ALERT_NAME
: Default alert name for TelegramDEFAULT_SKY_LOG_ALERTING_PHONE_CALL_ALERT_NAME
: Default alert name for phone callsDEFAULT_SKY_LOG_ALERTING_SMS_ALERT_NAME
: Default alert name for SMSSKY_LOG_ALERTING_BASE_URL
: Base URL for Skylog API callsSKY_LOG_ALERTING_TOKEN
: Your Skylog authentication token
-
Proxy Configuration: If using a proxy, include the following additional variables:
PROXY_USERNAME
PROXY_PASSWORD
PROXY_IP
PROXY_PORT
Usage Example
from skylog import AlertingSkyLogClient, AlertingProvider
# Initialize the Skylog client with the desired provider (e.g., Telegram)
client = AlertingSkyLogClient(provider=AlertingProvider.telegram)
# Example Operations:
client.fire_alert(description='Issue detected', instance_name='unique_key', provider=AlertingProvider.sms)
client.stop_alert(description='Issue resolved', instance_name='unique_key', provider=AlertingProvider.sms)
client.notify(description='Alert notification', instance_name='unique_key', provider=AlertingProvider.telegram)
Concepts to Understand
Alertname and Instance
- Alertname: Represents the provider or service. It identifies where Skylog sends alerts.
- Instance: A unique identifier within a group alert, specifying a particular part of a universal alert.
Alerts Management
- Firing an Alert: Triggering an alert, resulting in immediate notifications sent to relevant endpoints.
- Stopping an Alert: Removing a fired alert, resolving it and stopping further notifications.
- Notifying an Alert: Sending messages to endpoints without adding records to the triggered list.
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
skylog_sdk-0.1.13.tar.gz
(7.0 kB
view details)
Built Distribution
File details
Details for the file skylog_sdk-0.1.13.tar.gz
.
File metadata
- Download URL: skylog_sdk-0.1.13.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a1f911220356392ce6a7aa590a1d8e203a14db54e0360ba1c2e625817ee369d |
|
MD5 | 21aa10246390be10c0a65d08b005a24c |
|
BLAKE2b-256 | d2176a881e8760d433d900e4f34efc12b01375fc64c9cc1aaf9fb3ee602e43a4 |
File details
Details for the file skylog_sdk-0.1.13-py3-none-any.whl
.
File metadata
- Download URL: skylog_sdk-0.1.13-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccb2549570c39bcf0dcae850208cb9e866c28c4f7da6827a543a4d31d6d9dd15 |
|
MD5 | 5adb1b4a36d7fd44cbc5a6fe6cc9764a |
|
BLAKE2b-256 | 353ae6abb79b9abdd621380bcbf8de2697a64ce59adaa9b5cee2d1b0c6dfd118 |