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/11/02 15:06:19 UTC

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

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


##########
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:
   for 1, the [interval](https://github.com/influxdata/telegraf/blob/master/docs/CONFIGURATION.md#intervals) is configurable in telegraf. In the telegraf.conf of the e2e test, in order to obtain data faster, configure the interval to `1s`



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