-
Type:
New Feature
-
Status: Done
-
Priority:
Medium
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.4.0
-
Component/s: PMM Client
-
Labels:
-
Story Points:3
-
Epic Link:
-
Sprint:28W2017Y (07/10-07/16 ) R
Have pmm-admin list -json so the output can be easily parsed by our automation.
Additionally, it would be good to have this with most pmm-admin responses so we can automate all commands and easily parse the status with our automation.
1) pmm-admin list -json
must display only information about Services in json format
Example
$ sudo pmm-admin list pmm-admin 1.1.3 PMM Server | 192.168.100.1 Client Name | ubuntu-amd64 Client Address | 192.168.200.1 Service manager | linux-systemd ---------------- ----------- ----------- -------- ---------------- -- SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS -------------- ----------- ----------- -------- ---------------- -- - linux:metrics mongo-main 42000 YES mongodb:metrics mongo-main 42003 YES localhost:27017
$ sudo pmm-admin list -json [ { "service-type" : "linux:metrics", "name" : "mongo-main", "local-port" : "42000", "running" : "yes" }, { "service-type" : "mongodb:metrics", "name" : "mongo-main", "local-port" : "42003", "running" : "yes", "data-source" : "localhost:27017" } ]