SUSE / sap_host_exporter

Prometheus exporter for SAP systems (SAP S/4 HANA and SAP Netweaver hosts)
Apache License 2.0
34 stars 13 forks source link

Metrics related to SAP Enqueue Server are not displayed #55

Closed pipinstallyogi closed 4 years ago

pipinstallyogi commented 4 years ago

Hello Everyone,

The sap_host_exporter is running fine on the SAP system and it is showing most of the metrics as desired.

The exporter is showing all the metrics related to : SAP Start Service and SAP AS Dispatcher but it is not showing any metrics related to SAP Enqueue Server.

Any inputs how to get metrics related to SAP Enqueue Server will be highly appreciated.

Thanks in advance.

stefanotorresi commented 4 years ago

hello @pipinstallyogi, could you please paste the systemd unit log output, plus all the metrics it exports?

pipinstallyogi commented 4 years ago

Hi @stefanotorresi, thanks for the reply.

I believe you are asking for systemd unit log output in case I am starting the sap_host_exporter with systemctl command, right? I am, however, starting the sap_host_exporter using following command and not with systemctl command:

_RAS:/opt/sap_host_exporter # ./sap_hostexporter --sap-control-url http://18.185.3.81:50013 & [1] 13179 _RAS:/opt/sap_host_exporter # INFO[0000] Using config file: /opt/sap_host_exporter/sap_hostexporter.yaml INFO[0000] Monitoring SAP Instance SID: RAS, Name: D00, Number: 0, Hostname: RAS
INFO[0000] Start Service collector registered INFO[0000] Dispatcher optional collector registered INFO[0000] Serving metrics on 0.0.0.0:9680

The metrics it is exporting as seen in prometheus are:

_sap_dispatcher_queuehigh _sap_dispatcher_queuemax _sap_dispatcher_queuenow _sap_dispatcher_queuereads _sap_dispatcher_queuewrites _sap_start_serviceinstances _sap_start_serviceprocesses

I understand this is the information you asked. Please correct me if I am wrong. Thanks in advance

stefanotorresi commented 4 years ago

@pipinstallyogi it looks like there is no enqueue server running in that node. What are sap_start_service_instances and sap_start_service_processes reporting exactly?

MalloZup commented 4 years ago

@pipinstallyogi the sap_host_exporter is registering the needed collectors dynamically. This means that when it doesn't found the Enqueue Server where it runs, it will not expose its metrics.

looks like msg_server as @stefanotorresi says, is not running on the node. Can you verify such instance is running? TIA :white_flower:

pipinstallyogi commented 4 years ago

Thanks @stefanotorresi and @MalloZup. This is what sap_start_service_processes and sap_start_service_instances are exposing:

_# HELP sap_start_serviceinstances The SAP instances in the context of the whole SAP system _# TYPE sap_start_serviceinstances gauge _sap_start_service_instances{SID="RAS",features="ABAP|GATEWAY|ICMAN|IGS",instance_hostname="RAS",instance_name="D00",instance_number="0",startpriority="3"} 2 _# HELP sap_start_serviceprocesses The processes started by the SAP Start Service _# TYPE sap_start_serviceprocesses gauge _sap_start_service_processes{SID="RAS",instance_hostname="RAS",instance_name="D00",instancenumber="0",name="disp+work",pid="13052",status="Running"} 2 _sap_start_service_processes{SID="RAS",instance_hostname="RAS",instance_name="D00",instancenumber="0",name="gwrd",pid="13061",status="Running"} 2 _sap_start_service_processes{SID="RAS",instance_hostname="RAS",instance_name="D00",instancenumber="0",name="icman",pid="13062",status="Running"} 2 _sap_start_service_processes{SID="RAS",instance_hostname="RAS",instance_name="D00",instance_number="0",name="igswdmt",pid="13053",status="Running"} 2

I can also visualize these in Grafana within the dashboard you have provided into this repository. Thanks

stefanotorresi commented 4 years ago

yep, there is no enqueue server in that node, so there are no metrics to collect about it ;)

pipinstallyogi commented 4 years ago

Ahh I see, I just checked that Enqueue Server is running on instance number 01. Let me try to change the setting and update about the results. Thanks

pipinstallyogi commented 4 years ago

Hallo @stefanotorresi @MalloZup, Thanks for the input. After changing instance number in the command : _./sap_hostexporter --sap-control-url http://18.185.3.81:50013 to _./sap_hostexporter --sap-control-url http://18.185.3.81:50113 I am able to see the required metrics. Thanks for this information. However I would like to run both command at once (to get metrics from both) but in the sap_host_exporter.yaml file there is only one port (9680) defined. Can I define another port so as to run two commands simultaneously? Basically, I see the the exporter first look for the yaml file in present directory only. How do I achieve this? Thanks.

pipinstallyogi commented 4 years ago

Hallo @stefanotorresi @MalloZup,

Solved the issue. I just used the --config flag within command. Thanks for your help. Very helpful repository owners and Repo.

Thanks a lot

MalloZup commented 4 years ago

@pipinstallyogi glad we could help. feel free to open issue any time :sunflower: