You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/11/22 13:28:06 UTC
[GitHub] [skywalking-cli] arugal opened a new pull request #15: [Feature]
Support instance search command
arugal opened a new pull request #15: [Feature] Support instance search command
URL: https://github.com/apache/skywalking-cli/pull/15
works like this:
```bash
swctl i search -h
NAME:
swctl instance search - Filter the instance from the existing service instance list by given --regex and --service-id or --service-name parameters
USAGE:
swctl instance search [command options] [arguments...]
OPTIONS:
--start TIME query start TIME
--end TIME query end TIME
--regex Regex search Regex
--service-id ID query service ID (priority over "--service-name")
--service-name Name query service Name
swctl --debug --base-url=http://122.112.182.72:8080/graphql --display=yaml i search --service-id=2 --regex=projectB(.*)skywalking-server-0001 --start=2019-11-22 --step=MONTH
DEBUG Debug mode is enabled
DEBUG Using configurations:
global:
base-url: http://122.112.182.72:8080/graphql
DEBUG Start time: 2019-11-22 end time:
DEBUG >> variables: map[duration:{2019-11-22 2019-12-22 DAY} serviceId:2]
DEBUG >> query:
query ($serviceId: ID!, $duration: Duration!) {
instances: getServiceInstances(duration: $duration, serviceId: $serviceId) {
id
name
language
instanceUUID
attributes {
name
value
}
}
}
DEBUG >> headers: map[Accept:[application/json; charset=utf-8] Content-Type:[application/json; charset=utf-8]]
DEBUG << {"data":{"instances":[{"id":"2","name":"projectB-pid:24637@skywalking-server-0001","language":"JAVA","instanceUUID":"2eba68f2c3654683995a082cde5b29ce","attributes":[{"name":"os_name","value":"Linux"},{"name":"host_name","value":"skywalking-server-0001"},{"name":"process_no","value":"24637"},{"name":"ipv4s","value":"192.168.252.12"}]}]}}
- id: "2"
name: projectB-pid:24637@skywalking-server-0001
attributes:
- name: os_name
value: Linux
- name: host_name
value: skywalking-server-0001
- name: process_no
value: "24637"
- name: ipv4s
value: 192.168.252.12
language: JAVA
instanceuuid: 2eba68f2c3654683995a082cde5b29ce
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services