ulranh / sapnwrfc_exporter

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

Problem with the configfile content #11

Closed Redouane15 closed 3 years ago

Redouane15 commented 3 years ago

Hello,

After Installing and configuring the exporter, we can't start it and we get the message below :

Problem with the configfile content, the metric info is missing.

Any help for this issue please ?

Thanks a lot.

Regards, RedOne

ulranh commented 3 years ago

Hi, it looks like your config file is missing the metric information or something with the indentation is not correct. Please try the following content for testing purpose:

[[Systems]]
  Name = "t01"
  Usage = "test"
  Tags = []
  User = "sapuser"
  Lang = "en"
  Client = "100"
  Server = "host.domain.com"
  Sysnr = "00"

[[metrics]]
  Name = "sap_users"
  Help = "sm04"
  MetricType = "gauge"
  TagFilter = []
  FunctionModule = "TH_USER_LIST"
  AllServers = true
  [metrics.tabledata]
    Table = "USRLIST"
    [metrics.tabledata.rowcount]
      guiversion = ["76", "75", "74"]
      type = [4]

After that please create the secret data with: $ ./sapnwrfc_exporter pw -s t01 -c ./sapnwrfc_exporter.toml

The start the exporter with: $ ./sapnwrfc_exporter web -c ./sapnwrfc_exporter.toml

You should see the result in the browser with: http://localhost:9663/metrics

If this doesn't work, please send me your config file.

Redouane15 commented 3 years ago

Hello, Thanks a lot for your feedback. Please, find in the attached file the messages returned by executing the last two commands.

Thanks a lot for your help.

Regards, Redouane

Screen Shot 2021-02-01 at 13 16 45 Screen Shot 2021-02-01 at 13 16 35
ulranh commented 3 years ago

Hi, you are using an older version of sapnwrfc_exporter. Since v0.3 the cobra cli is in use and the command line arguments changed slightly (./sapnwrfc_exporter pw --help). Please compile a new binary - best combination in my experience at the moment is sapnwrfc_exporter v0.3 with nwrfcsdk PL6 (nwrfcsdk PL7 has some issues).

Redouane15 commented 3 years ago

Hello,

Thanks a lot for your feedback and help.

We updated the needed components as recommended.

Please find in the attached files, the current issue.

Thanks much.

Regards, Redouane

thumbnail_image002 thumbnail_image001

ulranh commented 3 years ago

Hi,

please call

./sapnwrfc_exporter web -h

to see the options. With command web you have the following options:

./sapnwrfc_exporter web --config /root/.sapnwrfc_exporter.toml or ./sapnwrfc_exporter web -c /root/.sapnwrfc_exporter.toml

Redouane15 commented 3 years ago

The porblem is resolved.

Thank you very much for your help.