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 2022/10/31 09:56:44 UTC

[GitHub] [skywalking] mrproliu commented on a diff in pull request #9620: Support the telegraf receiver plugin module

mrproliu commented on code in PR #9620:
URL: https://github.com/apache/skywalking/pull/9620#discussion_r1009228197


##########
oap-server/server-starter/src/main/resources/telegraf-rules/vm.yaml:
##########
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+expSuffix: service(['host'], Layer.OS_LINUX)
+metricPrefix: meter_vm
+metricsRules:
+
+  # cpu
+  - name: cpu_total_percentage
+    exp: cpu_usage_user.tagEqual('cpu' , 'cpu-total')
+  - name: cpu_average_used_telegraf
+    exp: cpu_usage_user.tagEqual('cpu' , 'cpu-total')
+  - name: cpu_load1
+    exp: system_load1
+  - name: cpu_load5
+    exp: system_load5
+  - name: cpu_load15
+    exp: system_load15
+
+  # memory
+  - name: memory_total
+    exp: mem_total
+  - name: memory_available
+    exp: mem_available
+  - name: memory_used
+    exp: mem_used
+
+  # swap
+  - name: memory_swap_free
+    exp: swap_free
+  - name: memory_swap_total
+    exp: cpu_swap_total
+  - name: memory_swap_percentage
+    exp: 100 - ((swap_free * 100) / cpu_swap_total)
+
+    #node filesystem
+  - name: filesystem_percentage_telegraf
+    exp: disk_used_percent

Review Comment:
   I have done a local test with the telegref, I think we need to use some aggregation function to aggregate the metrics: 
   1. The telegref will count the metrics every second and batch upload them. 
   ![image](https://user-images.githubusercontent.com/3417650/198979802-66e7811b-f2ca-43ef-bdba-fbc4ee2d1f1c.png)
   2. The telegref report data with multiple labels. for example, the dist used percent meter will contain metrics with multiple devices. 
   ![image](https://user-images.githubusercontent.com/3417650/198981390-ed44b9f5-61eb-4f02-84ab-992c368b2ee1.png)
   



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

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org