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/08/21 04:54:22 UTC

[GitHub] [skywalking] yswdqz opened a new pull request, #9495: Support PostgreSQL monitoring.

yswdqz opened a new pull request, #9495:
URL: https://github.com/apache/skywalking/pull/9495

   
   ### <Feature description>
   - [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
   - [x] Update the documentation to include this new feature.
   - [x] Tests(including UT, IT, E2E) are added to verify the new feature.
   - [x] If it's UI related, attach the screenshots below.
   
   - [x] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #9472 .
   - [x] Update the [`CHANGES` log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).
   
   Screenshots:
   ![image](https://user-images.githubusercontent.com/74546965/185776101-23f4d96e-04c5-4332-9b6b-b878d4e510fc.png)
   ![image](https://user-images.githubusercontent.com/74546965/185776108-5caa2fe4-a4a4-4eeb-8221-e57218026b04.png)
   ![image](https://user-images.githubusercontent.com/74546965/185776115-2cb3d43c-d00f-41e2-a1c8-63be4c05c2b4.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


[GitHub] [skywalking] yswdqz commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
yswdqz commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221585235

   I have a problem when I use the oltp exporter in OTEL collector: The OAP can't receive any data.
   The log of the collector is following:
   ```
   {"level":"error","ts":"2022-08-22T00:41:08.619+0800","caller":"exporterhelper/queued_retry.go:149","msg":"Exporting failed. Try enabling retry_on_failure config option to retry on retryable errors","kind":"exporter","data_type":"metrics","name":"opencensus","error":"EOF","stacktrace":"go.opentelemetry.io/collector/exporter/exporterhelper.(*retrySender).send\n\tC:/Users/runneradmin/go/pkg/mod/go.opentelemetry.io/collector@v0.55.0/exporter/exporterhelper/queued_retry.go:149\ngo.opentelemetry.io/collector/exporter/exporterhelper.(*metricsSenderWithObservability).send\n\tC:/Users/runneradmin/go/pkg/mod/go.opentelemetry.io/collector@v0.55.0/exporter/exporterhelper/metrics.go:132\ngo.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).send\n\tC:/Users/runneradmin/go/pkg/mod/go.opentelemetry.io/collector@v0.55.0/exporter/exporterhelper/queued_retry.go:83\ngo.opentelemetry.io/collector/exporter/exporterhelper.NewMetricsExporter.func2\n\tC:/Users/runneradmin/go/pkg/mod/
 go.opentelemetry.io/collector@v0.55.0/exporter/exporterhelper/metrics.go:112\ngo.opentelemetry.io/collector/consumer.ConsumeMetricsFunc.ConsumeMetrics\n\tC:/Users/runneradmin/go/pkg/mod/go.opentelemetry.io/collector@v0.55.0/consumer/metrics.go:36\ngo.opentelemetry.io/collector/service/internal/fanoutconsumer.(*metricsConsumer).ConsumeMetrics\n\tC:/Users/runneradmin/go/pkg/mod/go.opentelemetry.io/collector@v0.55.0/service/internal/fanoutconsumer/metrics.go:75\ngo.opentelemetry.io/collector/processor/batchprocessor.(*batchMetrics).export\n\tC:/Users/runneradmin/go/pkg/mod/go.opentelemetry.io/collector@v0.55.0/processor/batchprocessor/batch_processor.go:297\ngo.opentelemetry.io/collector/processor/batchprocessor.(*batchProcessor).sendItems\n\tC:/Users/runneradmin/go/pkg/mod/go.opentelemetry.io/collector@v0.55.0/processor/batchprocessor/batch_processor.go:176\ngo.opentelemetry.io/collector/processor/batchprocessor.(*batchProcessor).startProcessingCycle\n\tC:/Users/runneradmin/go/pkg/mod
 /go.opentelemetry.io/collector@v0.55.0/processor/batchprocessor/batch_processor.go:143"}
   {"level":"error","ts":"2022-08-22T00:41:08.619+0800","caller":"exporterhelper/queued_retry.go:85","msg":"Exporting failed. Dropping data. Try enabling sending_queue to survive temporary failures.","kind":"exporter","data_type":"metrics","name":"opencensus","dropped_items":495,"stacktrace":"go.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).send\n\tC:/Users/runneradmin/go/pkg/mod/go.opentelemetry.io/collector@v0.55.0/exporter/exporterhelper/queued_retry.go:85\ngo.opentelemetry.io/collector/exporter/exporterhelper.NewMetricsExporter.func2\n\tC:/Users/runneradmin/go/pkg/mod/go.opentelemetry.io/collector@v0.55.0/exporter/exporterhelper/metrics.go:112\ngo.opentelemetry.io/collector/consumer.ConsumeMetricsFunc.ConsumeMetrics\n\tC:/Users/runneradmin/go/pkg/mod/go.opentelemetry.io/collector@v0.55.0/consumer/metrics.go:36\ngo.opentelemetry.io/collector/service/internal/fanoutconsumer.(*metricsConsumer).ConsumeMetrics\n\tC:/Users/runneradmin/go/pkg/mod/go.opentelemet
 ry.io/collector@v0.55.0/service/internal/fanoutconsumer/metrics.go:75\ngo.opentelemetry.io/collector/processor/batchprocessor.(*batchMetrics).export\n\tC:/Users/runneradmin/go/pkg/mod/go.opentelemetry.io/collector@v0.55.0/processor/batchprocessor/batch_processor.go:297\ngo.opentelemetry.io/collector/processor/batchprocessor.(*batchProcessor).sendItems\n\tC:/Users/runneradmin/go/pkg/mod/go.opentelemetry.io/collector@v0.55.0/processor/batchprocessor/batch_processor.go:176\ngo.opentelemetry.io/collector/processor/batchprocessor.(*batchProcessor).startProcessingCycle\n\tC:/Users/runneradmin/go/pkg/mod/go.opentelemetry.io/collector@v0.55.0/processor/batchprocessor/batch_processor.go:143"}
   {"level":"warn","ts":"2022-08-22T00:41:08.619+0800","caller":"batchprocessor/batch_processor.go:178","msg":"Sender failed","kind":"processor","name":"batch","pipeline":"metrics","error":"EOF"}
   ```
   This log might be wrong because I have not use batch processor and anything about opencensus. But when I change exporter and OAP to opencensus , this log will not appear, and I can found the data.
   Followings are my OAP configs and collector config.
   ```
   receiver-otel:
     selector: ${SW_OTEL_RECEIVER:default}
     default:
       enabledHandlers: ${SW_OTEL_RECEIVER_ENABLED_HANDLERS:"otlp"}
       enabledOcRules: ${SW_OTEL_RECEIVER_ENABLED_OC_RULES:"istio-controlplane,k8s-node,oap,vm,mysql,postgresql"}
       enabledOtlpRules: ${SW_OTEL_RECEIVER_ENABLED_OTLP_RULES:"istio-controlplane,k8s-node,oap,vm,mysql,postgresql"} 
   ```
   ```
   receivers:
     prometheus:
       config: 
        scrape_configs:
          - job_name: 'postgresql-monitoring'
            scrape_interval: 10s
            static_configs:
              - targets: ['postgres-service:9187']
              
   processors:
   
   exporters:
     otlp:
       endpoint: oap:11800
       tls:
         insecure: true
     logging:
       loglevel: debug
   service:
     pipelines:
       metrics:
         receivers:
         - prometheus
         processors: []
         exporters:
         - logging
         - otlp
   ```


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


[GitHub] [skywalking] yswdqz commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
yswdqz commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221693617

   
   > @yswdqz Do you enable the handler?
   > 
   > ```yaml
   > receiver-otel:
   >   selector: ${SW_OTEL_RECEIVER:default}
   >   default:
   >     enabledHandlers: ${SW_OTEL_RECEIVER_ENABLED_HANDLERS:"oc,otlp"}
   > ```
   > 
   > @kezhenxu94 Should we enable both in default? I noticed you use System env to override `oc` by `otlp` in your PR. Could we have both? I think it is much easier. Further, should we merge `enabledOcRules` and ` enabledOtlpRules`?
   
   Yes, I have resolved the conflicts and keep all things in OC format? And the OAP logs can confirm that I enable it.
   ```
   :35:59,783 - org.apache.skywalking.oap.server.starter.config.ApplicationConfigLoader - 69 [main] INFO  [] - Get a provider define belong to receiver-otel module, provider name: default
   2022-08-22 00:35:59,783 - org.apache.skywalking.oap.server.starter.config.ApplicationConfigLoader - 118 [main] INFO  [] - Provider=default config=enabledHandlers has been set as otlp
   2022-08-22 00:35:59,783 - org.apache.skywalking.oap.server.starter.config.ApplicationConfigLoader - 118 [main] INFO  [] - Provider=default config=enabledOcRules has been set as istio-controlplane,k8s-node,oap,vm,mysql,postgresql
   2022-08-22 00:35:59,783 - org.apache.skywalking.oap.server.starter.config.ApplicationConfigLoader - 118 [main] INFO  [] - Provider=default config=enabledOtlpRules has been set as istio-controlplane,k8s-node,oap,vm,mysql,postgresql
   ```
   I will test in linux later, may be some problems with my computer.


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


[GitHub] [skywalking] wu-sheng commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221543825

   @yswdqz You could sync the master branch and update accordingly.


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


[GitHub] [skywalking] wu-sheng commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221642071

   @kezhenxu94 Could you check this?


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


[GitHub] [skywalking] wankai123 commented on a diff in pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wankai123 commented on code in PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#discussion_r950980412


##########
oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-service.json:
##########
@@ -0,0 +1,700 @@
+/**
+ * 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.
+ */
+
+[
+   {
+      "id":"7da9d2e6-7c10-4ab4-ba86-fd73889608ff",
+      "configuration":{
+         "children":[
+            {
+               "x":0,
+               "y":0,
+               "w":4,
+               "h":6,
+               "i":"0",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_shared_buffers"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToMB"
+                  }
+               ],
+               "widget":{
+                  "title":"Shared Buffers (MB)"
+               }
+            },
+            {
+               "x":4,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"1",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_effective_cache"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToGB"
+                  }
+               ],
+               "widget":{
+                  "title":"Effective Cache (GB)"
+               }
+            },
+            {
+               "x":4,
+               "y":6,
+               "w":5,
+               "h":6,
+               "i":"2",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_maintenance_work_mem"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Maintenance Work Mem (MB)"
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToMB"
+                  }
+               ]
+            },
+            {
+               "x":14,
+               "y":6,
+               "w":5,
+               "h":6,
+               "i":"3",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_work_mem"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToMB"
+                  }
+               ],
+               "widget":{
+                  "title":"Work Mem (MB)"
+               }
+            },
+            {
+               "x":9,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"4",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_seq_page_cost"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Seq Page Cost"
+               }
+            },
+            {
+               "x":14,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"5",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_random_page_cost"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Random Page Cost"
+               }
+            },
+            {
+               "x":0,
+               "y":6,
+               "w":4,
+               "h":6,
+               "i":"6",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_max_wal_size"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Max WAL Size (GB)"
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToGB"
+                  }
+               ]
+            },
+            {
+               "x":9,
+               "y":6,
+               "w":5,
+               "h":6,
+               "i":"7",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_max_parallel_workers"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Max Parallel Workers"
+               }
+            },
+            {
+               "x":19,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"8",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_max_worker_processes"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Max Worker Processes"
+               }
+            },
+            {
+               "x":0,
+               "y":12,
+               "w":6,
+               "h":10,
+               "i":"9",
+               "type":"Widget",
+               "metricTypes":[
+                  "readLabeledMetricsValues"
+               ],
+               "metrics":[
+                  "meter_pg_fetched_rows_rate"
+               ],
+               "graph":{
+                  "type":"Area",
+                  "opacity":0.4,
+                  "showXAxis":true,
+                  "showYAxis":true
+               },
+               "widget":{
+                  "title":"Fetched Rows Trend (rows per minute)"
+               },
+               "value":"9",
+               "label":"9"
+            },
+            {
+               "x":6,
+               "y":12,
+               "w":6,
+               "h":10,
+               "i":"10",
+               "type":"Widget",
+               "metricTypes":[
+                  "readLabeledMetricsValues"
+               ],
+               "metrics":[
+                  "meter_pg_inserted_rows_rate"
+               ],
+               "graph":{
+                  "type":"Area",
+                  "opacity":0.4,
+                  "showXAxis":true,
+                  "showYAxis":true
+               },
+               "widget":{
+                  "title":"Inserted Rows Trend (rows per minute)"

Review Comment:
   ```suggestion
                     "title":"Inserted Rows Trend (rows per second)"
   ```
   I found your expression is:
   ```yaml
     - name: inserted_rows_rate
       exp: pg_stat_database_tup_inserted.sum(['datname','server']).rate('PT1M')
   ```
   `rate(Duration)` means: Calculates the per-second `average rate of increase` in the time range, it should be `rows per second`
   If you want to calculate `rows per minute`, you should use:
   `increase(Duration)`: Calculates the increase in the time range.
   
   I think using `rate` here is correct, just need to fix the unit, and please check your previous `MySQL monitoring PR` and make these consistently.
   
   



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


[GitHub] [skywalking] yswdqz commented on a diff in pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
yswdqz commented on code in PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#discussion_r950943068


##########
oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-service.json:
##########
@@ -0,0 +1,700 @@
+/**
+ * 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.
+ */
+
+[
+   {
+      "id":"7da9d2e6-7c10-4ab4-ba86-fd73889608ff",
+      "configuration":{
+         "children":[
+            {
+               "x":0,
+               "y":0,
+               "w":4,
+               "h":6,
+               "i":"0",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_shared_buffers"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToMB"
+                  }
+               ],
+               "widget":{
+                  "title":"Shared Buffers (MB)"
+               }
+            },
+            {
+               "x":4,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"1",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_effective_cache"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToGB"
+                  }
+               ],
+               "widget":{
+                  "title":"Effective Cache (GB)"
+               }
+            },
+            {
+               "x":4,
+               "y":6,
+               "w":5,
+               "h":6,
+               "i":"2",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_maintenance_work_mem"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Maintenance Work Mem (MB)"
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToMB"
+                  }
+               ]
+            },
+            {
+               "x":14,
+               "y":6,
+               "w":5,
+               "h":6,
+               "i":"3",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_work_mem"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToMB"
+                  }
+               ],
+               "widget":{
+                  "title":"Work Mem (MB)"
+               }
+            },
+            {
+               "x":9,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"4",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_seq_page_cost"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Seq Page Cost"
+               }
+            },
+            {
+               "x":14,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"5",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_random_page_cost"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Random Page Cost"
+               }
+            },
+            {
+               "x":0,
+               "y":6,
+               "w":4,
+               "h":6,
+               "i":"6",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_max_wal_size"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Max WAL Size (GB)"
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToGB"
+                  }
+               ]
+            },
+            {
+               "x":9,
+               "y":6,
+               "w":5,
+               "h":6,
+               "i":"7",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_max_parallel_workers"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Max Parallel Workers"
+               }
+            },
+            {
+               "x":19,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"8",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_max_worker_processes"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Max Worker Processes"
+               }
+            },
+            {
+               "x":0,
+               "y":12,
+               "w":6,
+               "h":10,
+               "i":"9",
+               "type":"Widget",
+               "metricTypes":[
+                  "readLabeledMetricsValues"
+               ],
+               "metrics":[
+                  "meter_pg_fetched_rows_rate"
+               ],
+               "graph":{
+                  "type":"Area",
+                  "opacity":0.4,
+                  "showXAxis":true,
+                  "showYAxis":true
+               },
+               "widget":{
+                  "title":"Fetched Rows Trend"
+               },
+               "value":"9",
+               "label":"9"
+            },
+            {
+               "x":6,
+               "y":12,
+               "w":6,
+               "h":10,
+               "i":"10",
+               "type":"Widget",
+               "metricTypes":[
+                  "readLabeledMetricsValues"
+               ],
+               "metrics":[
+                  "meter_pg_inserted_rows_rate"
+               ],
+               "graph":{
+                  "type":"Area",
+                  "opacity":0.4,
+                  "showXAxis":true,
+                  "showYAxis":true
+               },
+               "widget":{
+                  "title":"Inserted Rows Trend"
+               },
+               "value":"10",
+               "label":"10"
+            },
+            {
+               "x":6,
+               "y":32,
+               "w":6,
+               "h":10,
+               "i":"11",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValues",
+                  "readMetricsValues",
+                  "readMetricsValues",
+                  "readMetricsValues",
+                  "readMetricsValues"
+               ],
+               "metrics":[
+                  "meter_pg_buffers_clean",
+                  "meter_pg_buffers_backend",
+                  "meter_pg_buffers_checkpoint",
+                  "meter_pg_buffers_backend_fsync",
+                  "meter_pg_buffers_alloc"
+               ],
+               "graph":{
+                  "type":"Line",
+                  "step":false,
+                  "smooth":false,
+                  "showSymbol":false,
+                  "showXAxis":true,
+                  "showYAxis":true
+               },
+               "widget":{
+                  "title":"Buffers Trend"
+               },
+               "value":"11",
+               "label":"11"
+            },
+            {
+               "x":12,
+               "y":12,
+               "w":6,
+               "h":10,
+               "i":"12",
+               "type":"Widget",
+               "metricTypes":[
+                  "readLabeledMetricsValues"
+               ],
+               "metrics":[
+                  "meter_pg_updated_rows_rate"
+               ],
+               "graph":{
+                  "type":"Line",
+                  "step":false,
+                  "smooth":false,
+                  "showSymbol":false,
+                  "showXAxis":true,
+                  "showYAxis":true
+               },
+               "widget":{
+                  "title":"Updated Rows Trend"

Review Comment:
   I get it.



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


[GitHub] [skywalking] wankai123 commented on a diff in pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wankai123 commented on code in PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#discussion_r950940361


##########
oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-service.json:
##########
@@ -0,0 +1,700 @@
+/**
+ * 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.
+ */
+
+[
+   {
+      "id":"7da9d2e6-7c10-4ab4-ba86-fd73889608ff",
+      "configuration":{
+         "children":[
+            {
+               "x":0,
+               "y":0,
+               "w":4,
+               "h":6,
+               "i":"0",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_shared_buffers"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToMB"
+                  }
+               ],
+               "widget":{
+                  "title":"Shared Buffers (MB)"
+               }
+            },
+            {
+               "x":4,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"1",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_effective_cache"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToGB"
+                  }
+               ],
+               "widget":{
+                  "title":"Effective Cache (GB)"
+               }
+            },
+            {
+               "x":4,
+               "y":6,
+               "w":5,
+               "h":6,
+               "i":"2",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_maintenance_work_mem"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Maintenance Work Mem (MB)"
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToMB"
+                  }
+               ]
+            },
+            {
+               "x":14,
+               "y":6,
+               "w":5,
+               "h":6,
+               "i":"3",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_work_mem"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToMB"
+                  }
+               ],
+               "widget":{
+                  "title":"Work Mem (MB)"
+               }
+            },
+            {
+               "x":9,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"4",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_seq_page_cost"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Seq Page Cost"
+               }
+            },
+            {
+               "x":14,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"5",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_random_page_cost"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Random Page Cost"
+               }
+            },
+            {
+               "x":0,
+               "y":6,
+               "w":4,
+               "h":6,
+               "i":"6",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_max_wal_size"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Max WAL Size (GB)"
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToGB"
+                  }
+               ]
+            },
+            {
+               "x":9,
+               "y":6,
+               "w":5,
+               "h":6,
+               "i":"7",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_max_parallel_workers"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Max Parallel Workers"
+               }
+            },
+            {
+               "x":19,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"8",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_max_worker_processes"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Max Worker Processes"
+               }
+            },
+            {
+               "x":0,
+               "y":12,
+               "w":6,
+               "h":10,
+               "i":"9",
+               "type":"Widget",
+               "metricTypes":[
+                  "readLabeledMetricsValues"
+               ],
+               "metrics":[
+                  "meter_pg_fetched_rows_rate"
+               ],
+               "graph":{
+                  "type":"Area",
+                  "opacity":0.4,
+                  "showXAxis":true,
+                  "showYAxis":true
+               },
+               "widget":{
+                  "title":"Fetched Rows Trend"
+               },
+               "value":"9",
+               "label":"9"
+            },
+            {
+               "x":6,
+               "y":12,
+               "w":6,
+               "h":10,
+               "i":"10",
+               "type":"Widget",
+               "metricTypes":[
+                  "readLabeledMetricsValues"
+               ],
+               "metrics":[
+                  "meter_pg_inserted_rows_rate"
+               ],
+               "graph":{
+                  "type":"Area",
+                  "opacity":0.4,
+                  "showXAxis":true,
+                  "showYAxis":true
+               },
+               "widget":{
+                  "title":"Inserted Rows Trend"
+               },
+               "value":"10",
+               "label":"10"
+            },
+            {
+               "x":6,
+               "y":32,
+               "w":6,
+               "h":10,
+               "i":"11",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValues",
+                  "readMetricsValues",
+                  "readMetricsValues",
+                  "readMetricsValues",
+                  "readMetricsValues"
+               ],
+               "metrics":[
+                  "meter_pg_buffers_clean",
+                  "meter_pg_buffers_backend",
+                  "meter_pg_buffers_checkpoint",
+                  "meter_pg_buffers_backend_fsync",
+                  "meter_pg_buffers_alloc"
+               ],
+               "graph":{
+                  "type":"Line",
+                  "step":false,
+                  "smooth":false,
+                  "showSymbol":false,
+                  "showXAxis":true,
+                  "showYAxis":true
+               },
+               "widget":{
+                  "title":"Buffers Trend"
+               },
+               "value":"11",
+               "label":"11"
+            },
+            {
+               "x":12,
+               "y":12,
+               "w":6,
+               "h":10,
+               "i":"12",
+               "type":"Widget",
+               "metricTypes":[
+                  "readLabeledMetricsValues"
+               ],
+               "metrics":[
+                  "meter_pg_updated_rows_rate"
+               ],
+               "graph":{
+                  "type":"Line",
+                  "step":false,
+                  "smooth":false,
+                  "showSymbol":false,
+                  "showXAxis":true,
+                  "showYAxis":true
+               },
+               "widget":{
+                  "title":"Updated Rows Trend"

Review Comment:
   Suggest adding a unit or specific explanation for the `Trend`, same as the other place.



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


[GitHub] [skywalking] wu-sheng commented on a diff in pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on code in PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#discussion_r950788004


##########
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/Layer.java:
##########
@@ -126,7 +126,12 @@ public enum Layer {
     /**
      * Cache conjectured by client side plugin(eg. skywalking-java -> JedisPlugin LettucePlugin)
      */
-    VIRTUAL_CACHE(19, false);
+    VIRTUAL_CACHE(19, false),
+
+    /**
+     * PostgreSQL is a powerful, open source object-relational database system

Review Comment:
   Don't put a subjective word(powerful) in the comment when refer to 3rd party project.
   Such as in this case, ppl could think we only accept monitoring something powerful as a layer. This is not our meaning. 😁



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


[GitHub] [skywalking] yswdqz commented on a diff in pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
yswdqz commented on code in PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#discussion_r950992014


##########
oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-service.json:
##########
@@ -0,0 +1,700 @@
+/**
+ * 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.
+ */
+
+[
+   {
+      "id":"7da9d2e6-7c10-4ab4-ba86-fd73889608ff",
+      "configuration":{
+         "children":[
+            {
+               "x":0,
+               "y":0,
+               "w":4,
+               "h":6,
+               "i":"0",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_shared_buffers"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToMB"
+                  }
+               ],
+               "widget":{
+                  "title":"Shared Buffers (MB)"
+               }
+            },
+            {
+               "x":4,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"1",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_effective_cache"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToGB"
+                  }
+               ],
+               "widget":{
+                  "title":"Effective Cache (GB)"
+               }
+            },
+            {
+               "x":4,
+               "y":6,
+               "w":5,
+               "h":6,
+               "i":"2",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_maintenance_work_mem"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Maintenance Work Mem (MB)"
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToMB"
+                  }
+               ]
+            },
+            {
+               "x":14,
+               "y":6,
+               "w":5,
+               "h":6,
+               "i":"3",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_work_mem"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToMB"
+                  }
+               ],
+               "widget":{
+                  "title":"Work Mem (MB)"
+               }
+            },
+            {
+               "x":9,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"4",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_seq_page_cost"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Seq Page Cost"
+               }
+            },
+            {
+               "x":14,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"5",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_random_page_cost"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Random Page Cost"
+               }
+            },
+            {
+               "x":0,
+               "y":6,
+               "w":4,
+               "h":6,
+               "i":"6",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_max_wal_size"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Max WAL Size (GB)"
+               },
+               "metricConfig":[
+                  {
+                     "calculation":"byteToGB"
+                  }
+               ]
+            },
+            {
+               "x":9,
+               "y":6,
+               "w":5,
+               "h":6,
+               "i":"7",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_max_parallel_workers"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Max Parallel Workers"
+               }
+            },
+            {
+               "x":19,
+               "y":0,
+               "w":5,
+               "h":6,
+               "i":"8",
+               "type":"Widget",
+               "metricTypes":[
+                  "readMetricsValue"
+               ],
+               "metrics":[
+                  "meter_pg_max_worker_processes"
+               ],
+               "graph":{
+                  "type":"Card",
+                  "fontSize":40,
+                  "textAlign":"center",
+                  "showUnit":true
+               },
+               "widget":{
+                  "title":"Max Worker Processes"
+               }
+            },
+            {
+               "x":0,
+               "y":12,
+               "w":6,
+               "h":10,
+               "i":"9",
+               "type":"Widget",
+               "metricTypes":[
+                  "readLabeledMetricsValues"
+               ],
+               "metrics":[
+                  "meter_pg_fetched_rows_rate"
+               ],
+               "graph":{
+                  "type":"Area",
+                  "opacity":0.4,
+                  "showXAxis":true,
+                  "showYAxis":true
+               },
+               "widget":{
+                  "title":"Fetched Rows Trend (rows per minute)"
+               },
+               "value":"9",
+               "label":"9"
+            },
+            {
+               "x":6,
+               "y":12,
+               "w":6,
+               "h":10,
+               "i":"10",
+               "type":"Widget",
+               "metricTypes":[
+                  "readLabeledMetricsValues"
+               ],
+               "metrics":[
+                  "meter_pg_inserted_rows_rate"
+               ],
+               "graph":{
+                  "type":"Area",
+                  "opacity":0.4,
+                  "showXAxis":true,
+                  "showYAxis":true
+               },
+               "widget":{
+                  "title":"Inserted Rows Trend (rows per minute)"

Review Comment:
   It's my fault, I'm going to calculate `per second`, I'll change it now.



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


[GitHub] [skywalking] wu-sheng commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221651634

   @yswdqz Could you resolve the conflicts and keep all things in OC format for now?
   
   Zhenxu is testing on showcase(https://github.com/apache/skywalking-showcase/tree/otlp) to see whether otlp could replace all oc, or whether there are some bugs.


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


[GitHub] [skywalking] wu-sheng commented on a diff in pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on code in PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#discussion_r950788712


##########
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/Layer.java:
##########
@@ -126,7 +126,12 @@ public enum Layer {
     /**
      * Cache conjectured by client side plugin(eg. skywalking-java -> JedisPlugin LettucePlugin)
      */
-    VIRTUAL_CACHE(19, false);
+    VIRTUAL_CACHE(19, false),
+
+    /**
+     * PostgreSQL is a powerful, open source object-relational database system

Review Comment:
   I like this version, it seems more objective.
   
   > PostgreSQL is an advanced, enterprise-class, and open-source relational database system. 
   
   Found from https://www.postgresqltutorial.com/postgresql-getting-started/what-is-postgresql/



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


[GitHub] [skywalking] yswdqz commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
yswdqz commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221470089

   I found that if I add the license to `mock.sql` , it will fail.
   ![image](https://user-images.githubusercontent.com/74546965/185776402-66f2d3a6-8e0d-47fc-b6f0-ae1de8dca821.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


[GitHub] [skywalking] wu-sheng commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221656422

   @yswdqz Do you enable the handler?
   
   ```yaml
   receiver-otel:
     selector: ${SW_OTEL_RECEIVER:default}
     default:
       enabledHandlers: ${SW_OTEL_RECEIVER_ENABLED_HANDLERS:"oc,otlp"}
   ```
   
   @kezhenxu94 Should we enable both in default? I noticed you use System env to override `oc` by `otlp` in your PR. Could we have both? I think it is much easier. Further, should we merge `enabledOcRules` and ` enabledOtlpRules`?


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


[GitHub] [skywalking] wu-sheng commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221548236

   In #9497, we have provided `enabledOtlpRules`, after you set `postgre` at `oc` and `oltp` rules, could you use `oltp` exporter in OTEL collector to verify the results whether they are as same as the current setup.


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


[GitHub] [skywalking] wu-sheng commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221695057

   > Yes, I have resolved the conflicts and keep all things in OC format?
   
   Yes, please. I don't think you should be blocked by a new protocol integration


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


[GitHub] [skywalking] yswdqz commented on a diff in pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
yswdqz commented on code in PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#discussion_r950788190


##########
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/Layer.java:
##########
@@ -126,7 +126,12 @@ public enum Layer {
     /**
      * Cache conjectured by client side plugin(eg. skywalking-java -> JedisPlugin LettucePlugin)
      */
-    VIRTUAL_CACHE(19, false);
+    VIRTUAL_CACHE(19, false),
+
+    /**
+     * PostgreSQL is a powerful, open source object-relational database system

Review Comment:
   I just copy from its official website. I don't know how to describe it.



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


[GitHub] [skywalking] kezhenxu94 commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221470996

   > I found that if I add the license to `mock.sql` , it will fail. ![image](https://user-images.githubusercontent.com/74546965/185776402-66f2d3a6-8e0d-47fc-b6f0-ae1de8dca821.png)
   > 
   > This is probably because of PostgreSQL, when I do this by MySQL , It will success.
   
   The standard comment style of SQL is `--`, mysql allows `#` maybe just because mysql has extended syntax for that


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


[GitHub] [skywalking] yswdqz commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
yswdqz commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221701210

   > > Yes, I have resolved the conflicts and keep all things in OC format?
   > 
   > Yes, please. I don't think you should be blocked by a new protocol integration
   
   OK, I have pushed them.


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


[GitHub] [skywalking] wu-sheng commented on a diff in pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on code in PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#discussion_r951057489


##########
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/Layer.java:
##########
@@ -126,7 +126,12 @@ public enum Layer {
     /**
      * Cache conjectured by client side plugin(eg. skywalking-java -> JedisPlugin LettucePlugin)
      */
-    VIRTUAL_CACHE(19, false);
+    VIRTUAL_CACHE(19, false),
+
+    /**
+     * PostgreSQL is an advanced, enterprise-class, and open-source relational database system.
+     */
+    POSTGRESQL(20, true);

Review Comment:
   @Fine0830 Please add this layer available to the menu as root, and put PostgreSQL as a sub-menu in the Database side by side with MySQL, name `PostgreSQL`



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


[GitHub] [skywalking] yswdqz commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
yswdqz commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221472234

   > BTW, do you have env to work on showcase now? Or still need extra setup from us?
   
    Sorry. My environment still doesn't work.


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


[GitHub] [skywalking] kezhenxu94 commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221694454

   @yswdqz please keep all tests in OC format for now, I'll test all features in showcase and update


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


[GitHub] [skywalking] wu-sheng merged pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wu-sheng merged PR #9495:
URL: https://github.com/apache/skywalking/pull/9495


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


[GitHub] [skywalking] yswdqz commented on a diff in pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
yswdqz commented on code in PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#discussion_r950789625


##########
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/Layer.java:
##########
@@ -126,7 +126,12 @@ public enum Layer {
     /**
      * Cache conjectured by client side plugin(eg. skywalking-java -> JedisPlugin LettucePlugin)
      */
-    VIRTUAL_CACHE(19, false);
+    VIRTUAL_CACHE(19, false),
+
+    /**
+     * PostgreSQL is a powerful, open source object-relational database system

Review Comment:
   Got it.



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


[GitHub] [skywalking] wu-sheng commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221472583

   > > BTW, do you have env to work on showcase now? Or still need extra setup from us?
   > 
   > 
   > 
   >  Sorry. My environment still doesn't work.
   
   FYI @kezhenxu94 This would need your helps again after merging.


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


[GitHub] [skywalking] wu-sheng commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221471849

   BTW, do you have env to work on showcase now? Or still need extra setup from us?


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


[GitHub] [skywalking] yswdqz commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
yswdqz commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221548377

   I get it.


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


[GitHub] [skywalking] wu-sheng commented on pull request #9495: Support PostgreSQL monitoring.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #9495:
URL: https://github.com/apache/skywalking/pull/9495#issuecomment-1221470480

   > I found that if I add the license to `mock.sql` , it will fail.
   > 
   > ![image](https://user-images.githubusercontent.com/74546965/185776402-66f2d3a6-8e0d-47fc-b6f0-ae1de8dca821.png)
   > 
   > 
   > 
   > This is probably because of PostgreSQL, when I do this by MySQL , It will success.
   
   You could check the PostgreSQL doc, which style comment do they support, such as -- or something else.


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