Watchdog APIs
REST JSON APIs
- /status/core
- /status/sgx
- /status/schains
- /status/hardware
- /status/endpoint
- /status/schain-containers-versions
- /status/meta-info
- /status/btrfs
- /status/ssl
- /status/ima
- /status/public-ip
- /status/validator-nodes
= Watchdog
== Introduction
SKALE Watchdog is microservice running on every SKALE node for providing SLA agents with node performance metrics. It also can be used for external monitoring goals (validators can use it in their monitoring tools).
Watchdog is a Python script running in docker container with Flask web server that provides simple REST JSON API available on port 3009 (http://YOUR_SKALE_NODE_IP:3009). Currently, Watchdog can give data on all SKALE node docker containers, health checks of sChains and SGX server, ethereum node endpoint status, and hardware information.
[NOTE] Node CLI automatically opens port 3009 on the machine using iptables. Be sure that port 3009 is open for the node’s external network for Watchdog to work.
== REST JSON APIs
- xref:core[/status/core]
- xref:sgx[/status/sgx]
- xref:schains[/status/schains]
- xref:hardware[/status/hardware]
- xref:endpoint[/status/endpoint]
- xref:schain-containers-versions[/status/schain-containers-versions]
- xref:meta-info[/status/meta-info]
- xref:btrfs[/status/btrfs]
- xref:ssl[/status/ssl]
- xref:ima[/status/ima]
- xref:public-ip[/status/public-ip]
- xref:validator-nodes[/status/validator-nodes]
/status/core
Description
Returns data on all SKALE containers running on a given node. These are containers with prefix skale_
, including base containers and pairs of sChain and IMA containers, where every pair corresponds to a certain sChain assigned to this node.
Here is a list of the base containers:
- skale_transaction-manager
- skale_admin
- skale_api
- skale_mysql
- skale_sla
- skale_bounty
- skale_watchdog
- skale_nginx
Docker container name patterns for sChain with name SCHAIN_NAME are the following:
- sChain: skale_schain_SCHAIN_NAME
- IMA: skale_ima_SCHAIN_NAME
Usage
/status/sgx
Description
Returns SGX server info - connection status and SGX wallet version
Usage
/status/schains
Description
Returns list of health checks for every sChain running on a given node:
- data_dir - checks that sChain data dir exists
- dkg - checks that DKG procedure is completed for current sChain
- config - checks that sChain config file exists
- volume - checks that sChain volume exists
- firewall_rules - checks that firewall rules are set correctly
- container - checks that skaled container is running
- ima_container - checks that IMA container is running
- RPC - checks that local skaled RPC is accessible
- blocks - checks that local skaled is mining blocks
Usage
/status/endpoint
Description
Returns info on ethereum node endpoint, used by a given SKALE node - current block number and syncing status (web3.eth.syncing result)
Usage
/status/hardware
Description
Returns node hardware information:
- cpu_total_cores - return the number of logical CPUs in the system ( the number of physical cores multiplied by the number of threads that can run on each core)
- cpu_physical_cores - return the number of physical CPUs in the system
- memory - total physical memory in bytes (exclusive swap)
- swap - total swap memory in bytes
- system_release - system/OS name and system’s release
- uname_version - system’s release version
- attached_storage_size - attached storage size in bytes
Usage
Example of Response
/status/containers
Documentation unavailable.
/status/meta-info
Description
Returns steam versions.
Usage
/status/schain-containers-versions
Description
Returns SKALE Chain and IMA container versions.
Usage
/status/btrfs
Description
Returns btrfs kernel information.
Usage
/status/ssl
Description
Returns key-cert pair validity.
Usage
Example Response
/status/ima
Description
Returns the status of the IMA container.