Skip to main content

SKALE Watchdog Client - SKALE and FAIR Nodes Health Checks

Project description

SKALE Watchdog Client

Discord

Minimal Python client for interacting with SKALE Watchdog node APIs (SKALE + FAIR).

Install

pip install skale-watchdog-client

Supports Python 3.13+.

Quick Start

from watchdog_client import SkaleNode, SkalePassiveNode, FairNode, FairPassiveNode

# Base URL can be domain name or IP address of the node.
skale_node = SkaleNode('my-skale-node.example.com')
# Use SkalePassiveNode for SKALE nodes running in passive mode
skale_passive = SkalePassiveNode('my-passive-skale-node.example.com')

fair_node = FairNode('my-fair-node.example.com')
# Use FairPassiveNode for FAIR nodes running in passive mode (no SGX endpoint)
fair_passive = FairPassiveNode('my-passive-fair-node.example.com')

# Call any endpoint – each returns ApiResult (fields: data, error, status_code)
r = skale_node.public_ip()
if r:
	print('Public IP:', r.data)
else:
	print('Error:', r.error)

# Execute every available check on a node
results = skale_node.all_checks()
for name, res in results.items():
	print(name, 'OK' if res else f'ERR: {res.error}')

API

Common (available on both SkaleNode and FairNode)

  • containers
  • sgx (not available on FAIR passive nodes; see FairPassiveNode)
  • hardware
  • endpoint
  • meta_info (maps to /meta-info)
  • btrfs
  • ssl
  • check_report (maps to /check-report)

SKALE-specific (SkaleNode)

  • schains
  • ima
  • schain_containers_versions (maps to /schain-containers-versions)
  • public_ip (maps to /public-ip)
  • validator_nodes (maps to /validator-nodes)

SKALE Passive (SkalePassiveNode)

Same as SkaleNode, except the following checks return an error (404), because they are not available on SKALE passive nodes:

  • sgx
  • schains
  • ima
  • validator_nodes

FAIR-specific (FairNode)

  • chain_checks (maps to /chain-checks)
  • chain_record (maps to /chain-record)

FAIR Passive (FairPassiveNode)

Same as FairNode, except:

  • sgx — returns an error ApiResult: "SGX check is not available on FAIR passive nodes"

Batch execution

Call all_checks() on any node instance to execute each public check method (no params) and get a dict mapping method name to its ApiResult. One failing check does not stop others.

Result Object

res = fair.chain_checks()
if res:
	print(res.data)
else:
	raise RuntimeError(res.error)

License

GitHub

All contributions are made under the GNU Affero General Public License v3. See LICENSE.

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

skale_watchdog_client-3.2.0.dev0.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

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

skale_watchdog_client-3.2.0.dev0-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file skale_watchdog_client-3.2.0.dev0.tar.gz.

File metadata

File hashes

Hashes for skale_watchdog_client-3.2.0.dev0.tar.gz
Algorithm Hash digest
SHA256 f715ab50b6aedd27662c41f311173434bfe62d92ecd4fd1b9a97d9f4bc965557
MD5 67f65e839af74a18d39d322d1228a2c7
BLAKE2b-256 d6eb0dd801c1040cb1af269b15e4a9a4a989575e59f545bf7c5022ba6c25316d

See more details on using hashes here.

File details

Details for the file skale_watchdog_client-3.2.0.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for skale_watchdog_client-3.2.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 83edd1a66d4af7c0e88f15c99a87e09134a80a771dc75008778f50f6ff6617c0
MD5 ee20f59ff1c01ee6f36ddbc4a0eb5f6d
BLAKE2b-256 c3a60566651a1137414c47f535d0c103f5a0fb97a2f063b94334f1e454cc0913

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