ulranh / sapnwrfc_exporter

sapnwrfc_exporter - SAP NWRFC Exporter for Prometheus
Apache License 2.0
31 stars 6 forks source link

Metrics not visible in Prometheus #2

Closed pipinstallyogi closed 4 years ago

pipinstallyogi commented 4 years ago

Hello everyone,

I have configured the sapnwrfc_exporter in a system where my SAP host is running. I can successfully view my system up and running in Prometheus with multiple metrics relations to the machine itself. However, I am not able to see the metrics in Prometheus which are related to SAP system. Below is how my sapnwrfc_exporter.toml look like:

[[Systems]] Name = "PR2" Usage = "test" Tags = ["erp"] User = "sapuser" Lang = "de" Client = "120" Server = "192.168.xxx.xx" Sysnr = "00"

[[TableMetrics]] Name = "sap_processes" Help = "Number of sm50 processes" MetricType = "gauge" TagFilter = ["erp"] FuMo = "TH_WPINFO" Table = "WPLIST" AllServers = true [TableMetrics.Params] SRVNAME = "" [TableMetrics.RowCount] WP_TABLE = ["dbvm", "dbvl", "ma61v", "mdup"] WP_TYP = ["dia", "btc", "upd", "upd2", "spo"] [TableMetrics.RowFilter] WP_STATUS = ["hält", "läuft"]

Am I missing something under [[TableMetrics]]? What exactly should be in the field 'SRVNAME' should come? Are these table related metrics are only available metrics at the moment or shall we visualize more data related to SAP System? Any inputs are highly appreciated. Thanks in advance.

ulranh commented 4 years ago

Hi,

[TableMetrics.Params]
  SRVNAME = ""

is okay. It means that the processes of the called application server will be taken. The umlauts in TableMetric.RowFilter do not look healthy. Please try it with

Lang = "en"

and

[TableMetrics.RowFilter]
    WP_STATUS = ["on hold", "running"]

If the exporter is running you can call localhost:9663/metrics and should see a lot of metrics-lines. If everything works, also something like:

# HELP sap_processes sm50 help
# TYPE sap_processes gauge
sap_processes{count="wp_table_dbvl",server="server",system="pr2",usage="test"} 0
sap_processes{count="wp_table_dbvm",server="server",system="pr2",usage="test"} 0
sap_processes{count="wp_table_ma61v",server="server",system="pr2",usage="test"} 0
...

If you want to see these metrics in prometheus, you need a job entry in the prometheus configfile, that is responsable for calling the running exporter in defined intervalls.

pipinstallyogi commented 4 years ago

Thanks for the update. The problem seems to be solved now.