painless-security / trust-router

Moonshot Trust Router
0 stars 0 forks source link

Test: Monitoring interface 'show' command #88

Closed jennifer-richards closed 6 years ago

jennifer-richards commented 6 years ago

Monitoring interface show command

Steps

  1. Configure the trust router with its monitoring interface enabled and an authorized credential specified. Ensure that the firewall or AWS security policy allows access to the monitoring port.
  2. Execute trmon <host> <port> [...] with the various argument combinations below
  3. Examine the output and check that it... a. is valid JSON (either by hand, using JSONLint, or however you prefer) b. contains the expected structure c. contains accurate information

Expected results

Arguments to test

jennifer-richards commented 6 years ago

The documentation is here (Painless Security access only)

meadmaker commented 6 years ago

The JSON is valid:

-bash-4.2$ for i in version config_files uptime tid_reqs_processed tid_reqs_pending tid_error_count routes peers communities realms rp_clients; do   echo -n "${i}: ";   trmon tr.qa.painless-security.com 12310 show ${i} 2>/dev/null | jsonlint-php ; done
version: Valid JSON
config_files: Valid JSON
uptime: Valid JSON
tid_reqs_processed: Valid JSON
tid_reqs_pending: Valid JSON
tid_error_count: Valid JSON
routes: Valid JSON
peers: Valid JSON
communities: Valid JSON
realms: Valid JSON
rp_clients: Valid JSON

I still need to work through whether the information returned is correct and up to date.

meadmaker commented 6 years ago

Verified.