Skip to main content

ObservabilityAPI

Project description

ObservabilityAPI

Observability API

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.2
  • Package version: 1.0.2
  • Generator version: 7.11.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.8+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import ObservabilityAPI

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import ObservabilityAPI

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import ObservabilityAPI
from ObservabilityAPI.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost/PhrameObservability
# See configuration.py for a list of all supported configuration parameters.
configuration = ObservabilityAPI.Configuration(
    host = "http://localhost/PhrameObservability"
)



# Enter a context with an instance of the API client
with ObservabilityAPI.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ObservabilityAPI.GrafanaApi(api_client)
    datasource_name = 'datasource_name_example' # str | Name for the datasource
    datasource_type = prometheus # str | Type of datasource to create (default to prometheus)
    datasource_url = 'datasource_url_example' # str | URL of the datasource endpoint
    service_key = 'service_key_example' # str | Grafana service account key for authentication
    database_name = 'database_name_example' # str | Database name (for database datasources) (optional)
    username = 'username_example' # str | Username for datasource authentication (optional)
    password = 'password_example' # str | Password for datasource authentication (optional)
    is_default = False # bool | Set this datasource as default (optional) (default to False)
    basic_auth = False # bool | Enable basic authentication (optional) (default to False)

    try:
        # Add Datasource to Grafana
        api_response = api_instance.add_grafana_datasource(datasource_name, datasource_type, datasource_url, service_key, database_name=database_name, username=username, password=password, is_default=is_default, basic_auth=basic_auth)
        print("The response of GrafanaApi->add_grafana_datasource:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling GrafanaApi->add_grafana_datasource: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost/PhrameObservability

Class Method HTTP request Description
GrafanaApi add_grafana_datasource POST /grafana/datasource Add Datasource to Grafana
GrafanaApi deploy_grafana_dashboards GET /grafana Deploy Grafana Dashboards
GrafanaApi generate_grafana_service_key GET /grafana/auth Generate Grafana Service Account Key
PrometheusApi add_exporter_to_host PUT /prometheus Add/Update Specific Exporter for Host
PrometheusApi add_prometheus_target POST /prometheus Add Prometheus Monitoring Target
PrometheusApi get_prometheus_targets GET /prometheus Get Prometheus Targets Configuration
PrometheusApi remove_prometheus_target DELETE /prometheus Remove Prometheus Monitoring Target

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

max.smith@3adesign.co.uk

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

observabilityapi-1.0.5.tar.gz (34.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

observabilityapi-1.0.5-py3-none-any.whl (44.1 kB view details)

Uploaded Python 3

File details

Details for the file observabilityapi-1.0.5.tar.gz.

File metadata

  • Download URL: observabilityapi-1.0.5.tar.gz
  • Upload date:
  • Size: 34.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for observabilityapi-1.0.5.tar.gz
Algorithm Hash digest
SHA256 d1db2ca31f93c4f73a0ab4b99cef3e28c64c0d24ae04685fcb91ece9e6cd35ab
MD5 066bdfea7a981f97867ef01b006c2379
BLAKE2b-256 f2666c402630a5d7aa0b0dbd606242b23d59f292f6cb1c9d0188a10f39ce9314

See more details on using hashes here.

File details

Details for the file observabilityapi-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for observabilityapi-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d8d9814b776fd1b338529c4aa59f4267d84cd5cbc7a5bd9c9fcc2ac5fba74818
MD5 2f508db808bae2ff467872a4d8c641c0
BLAKE2b-256 50ff7757a6f9c44224fddf4f97af317863224d55528ce643983ad613e2c793c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page