Skip to main content

GlobalNOC Status Monitoring Library

This Python library is used to write status files for GRNOC software.


Requirements

Please make sure you have the following dependencies already installed on your host:

  • python3
  • python3-setuptools

Installation

Run the following command to install the library:

foo@bar:~$ sudo yum install python3-globalnoc-monitoring-service-status

Import

Import the write_service_status function using the following line of code:

from globalnoc_monitoring_service_status import write_service_status

Function Parameters

The write_service_status function has the following parameters:

Parameter Required? Default Value Description
error Yes - Error Number
error_text Yes - Error Description
path No - Target folder
service No - Service Name
filename No status.txt Status File Name
timestamp No Current Time Unix Timestamp

Note: You must either provide a path to the status file folder or a service name.

If for some reason path and service are both passed as arguments, the function will create the status file at the provided path.

Usage

Here are some code snippets using this module:

from globalnoc_monitoring_service_status import write_service_status

# Create status.txt at /var/lib/grnoc/fortigate_collector/
write_service_status(error=0,
                     error_text='Data queued to RabbitMQ Successfully.', 
                     service='fortigate_collector')

# Create status_log at /var/lib/my_service/
write_service_status(error=1,
                     error_text='Error making GET request.', 
                     path='/var/lib/my_service/', 
                     filename='status_log')

# Create status.txt at /var/lib/my_service/ with custom timestamp
write_service_status(error=1,
                     error_text='Error making GET request.', 
                     path='/var/lib/my_service/',
                     timestamp='1596547846')

Metadata

Release files for globalnoc-monitoring-service-status 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for globalnoc-monitoring-service-status 0.1.0
File Size Uploaded Provenance
globalnoc-monitoring-service-status-0.1.0.tar.gz 2.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for globalnoc-monitoring-service-status 0.1.0
File Interpreter ABI Platform
globalnoc_monitoring_service_status-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.6 kB

Release files / globalnoc-monitoring-service-status-0.1.0.tar.gz

Download URL globalnoc-monitoring-service-status-0.1.0.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f8c630b267a3374c7ba33bf06e8053ecf0507fc3fb1be0cb170d5d934509b4c1
BLAKE2b-256 checksum
How to use checksums
e841bda296e13c78816aae81ea74e7346d66e578be16bcabadcaed18ec5f2678
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.8.13 Linux/3.10.0-957.27.2.el7.x86_64

Release files / globalnoc_monitoring_service_status-0.1.0-py3-none-any.whl

Download URL globalnoc_monitoring_service_status-0.1.0-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13e4aa58fbb03980b7425a55e35dee894bb67320f81d36bb70e162369822506e
BLAKE2b-256 checksum
How to use checksums
49b6f2469af292a08f053fb31e2b39b7e2a85ae014f33a340fe291756c2f6087
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.8.13 Linux/3.10.0-957.27.2.el7.x86_64

Security for globalnoc-monitoring-service-status 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page