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 2020/12/02 02:26:38 UTC

[GitHub] [skywalking] chengaofeng opened a new issue #5935: how could I get `service_relation_server_cpm metric` by `HOUR` or `DAY`

chengaofeng opened a new issue #5935:
URL: https://github.com/apache/skywalking/issues/5935


   I am using ```GraphQL``` to query the ```service_relation_server_cpm``` metric from OAP, It's ok when  the ```Duration``` is step by ```MINUTE```. while set the step by ```HOUR``` or ```DAY```, the 	```value``` is always ```0```.
   
   OAP version ```7.0.0```
   
   ## query
   
   ```
   	
   query: quryTopoInfo($duration: Duration!) {
   	cpmS: getLinearIntValues(metric:{
   		name: "service_relation_server_cpm"
   		id: "9_10"
   	}, duration: $duration) {
         values {
           id
           value
         }
       }
   }
   	
   ```
   
   ## step by minute 
   
   ##### Variables
   
   ```
   {"duration":{"start":"2020-12-02 0930","end":"2020-12-02 0935","step":"MINUTE"}}
   
   ```
   
   ##### Response
   
   ```
   {"data":{"cpmS":{"values":[{"id":"202012020930_9_10","value":5},{"id":"202012020931_9_10","value":3},{"id":"202012020932_9_10","value":3},{"id":"202012020933_9_10","value":7},{"id":"202012020934_9_10","value":2},{"id":"202012020935_9_10","value":8}]}}}
   ```
   
   
   ## step by hour
   
   ##### Variables
   
   ```
   {"duration":{"start":"2020-12-02 09","end":"2020-12-02 10","step":"HOUR"}}
   
   ```
   
   ##### Response
   
   ```
   {"data":{"cpmS":{"values":[{"id":"2020120209_9_10","value":0},{"id":"2020120210_9_10","value":0}]}}}
   
   ```
   
   ## step by day
   
   ##### Variables
   
   ```
   {"duration":{"start":"2020-12-01","end":"2020-12-02","step":"DAY"}}
   
   ```
   
   ##### Response
   
   ```
   {"data":{"cpmS":{"values":[{"id":"20201201_9_10","value":0},{"id":"20201202_9_10","value":0}]}}}
   
   ```
   
   
   ## the data store in the es
   
   ```
   {"_index":"service_relation_server_cpm-20201202","_type":"_doc","_id":"202012020935_9_10","_score":5.6863337,"_source":{"total":8,"time_bucket":202012020935,"entity_id":"9_10","value":8}},
   {"_index":"service_relation_server_cpm-20201202","_type":"_doc","_id":"202012020936_9_10","_score":5.6863337,"_source":{"total":3,"time_bucket":202012020936,"entity_id":"9_10","value":3}},
   {"_index":"service_relation_server_cpm-20201202","_type":"_doc","_id":"20201202_9_10","_score":5.6863337,"_source":{"total":30,"time_bucket":20201202,"entity_id":"9_10","value":0}},
   {"_index":"service_relation_server_cpm-20201202","_type":"_doc","_id":"202012020931_9_10","_score":5.6863337,"_source":{"total":3,"time_bucket":202012020931,"entity_id":"9_10","value":3}},
   {"_index":"service_relation_server_cpm-20201202","_type":"_doc","_id":"202012020932_9_10","_score":5.6863337,"_source":{"total":3,"time_bucket":202012020932,"entity_id":"9_10","value":3}},
   {"_index":"service_relation_server_cpm-20201202","_type":"_doc","_id":"202012020933_9_10","_score":5.6863337,"_source":{"total":7,"time_bucket":202012020933,"entity_id":"9_10","value":7}},
   {"_index":"service_relation_server_cpm-20201202","_type":"_doc","_id":"202012020934_9_10","_score":5.6863337,"_source":{"total":2,"time_bucket":202012020934,"entity_id":"9_10","value":2}},
   {"_index":"service_relation_server_cpm-20201202","_type":"_doc","_id":"202012020930_9_10","_score":3.5491176,"_source":{"total":5,"time_bucket":202012020930,"entity_id":"9_10","value":5}},
   {"_index":"service_relation_server_cpm-20201202","_type":"_doc","_id":"2020120209_9_10","_score":3.5491176,"_source":{"total":30,"time_bucket":2020120209,"entity_id":"9_10","value":0}},
   
   ```
   
   there are two problems i am confused
   
   1. the ```value``` field of item ```_id: 20201202_9_10``` and ```_id: 2020120209_9_10``` is ```0```.
   
   1. the ```total``` field of item ```_id: 20201202_9_10``` and ```_id: 2020120209_9_10``` is ```30``` , which is not equals ```8 + 3 + 3 + 3 + 7+ 2 + 5 = 31 ```
   
   
   Please winder me if I am wrong, and point me the right way to get ```service_relation_server_cpm``` metric by ```HOUR``` and ```DAY```
   


----------------------------------------------------------------
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



[GitHub] [skywalking] chengaofeng commented on issue #5935: how could I get `service_relation_server_cpm metric` by `HOUR` or `DAY`

Posted by GitBox <gi...@apache.org>.
chengaofeng commented on issue #5935:
URL: https://github.com/apache/skywalking/issues/5935#issuecomment-737023091


   @wu-sheng Thank you very mach, I mistake the meaning of ```cpm```. Now I want to konw if there are any way to query  ```Calls per hour``` or ```Calls per day``` by ```GraphQL```, as some of my service is not called frequently, the step by ```HOUR``` or ```DAY``` of ```cpm``` is always ```0``` , so I just want to display the total number of calls between service  by day or hour. 


----------------------------------------------------------------
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



[GitHub] [skywalking] wu-sheng closed issue #5935: how could I get `service_relation_server_cpm metric` by `HOUR` or `DAY`

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #5935:
URL: https://github.com/apache/skywalking/issues/5935


   


----------------------------------------------------------------
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



[GitHub] [skywalking] wu-sheng commented on issue #5935: how could I get `service_relation_server_cpm metric` by `HOUR` or `DAY`

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5935:
URL: https://github.com/apache/skywalking/issues/5935#issuecomment-736953975


   Yes, `30 calls in a whole day` means 0 cpm. Because `cpm` is Calls per minute, which in one day, you need 60 * 24 calls, right?


----------------------------------------------------------------
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



[GitHub] [skywalking] wu-sheng commented on issue #5935: how could I get `service_relation_server_cpm metric` by `HOUR` or `DAY`

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5935:
URL: https://github.com/apache/skywalking/issues/5935#issuecomment-737032249


   >  Now I want to konw if there are any way to query Calls per hour or Calls per day by GraphQL
   
   No, it isn't. It depends on the metrics OAL.


----------------------------------------------------------------
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