How to use Prometheus acquisition of SAP ABAP Netweaver Application log data

Prometheus is an open source framework alarm monitoring system. It is inspired by Google's borgmon monitoring system, created in 2012 by a former employee google SoundCloud's work, developed as an open source project community, and released in 2015. 2016, Prometheus officially joined the Cloud Native Computing Foundation, the project has become second only to the popularity of Kubernetes.

clipboard1,1

Prometheus we can use the powerful monitoring features to capture all the logs run on the SAP ABAP Netweaver application server. To SAP CRM Fiori applications My Opportunity example, assume that I developed a custom log function, all users of Opportunity read operation details, including the requester, request the date and time of request records in a database table.

clipboard2,2

Then I hoping Prometheus, Netweaver periodically queries the server, monitor its service the number of read requests. Here are the steps.

(1) create a enhanced BAdI definition CRM_OPPORTUNITY_ODATA_BD CRM My Opportunity background OData service implementation in.

Because all read requests go through the final approach SORT_AND_FILTER_OPPT_TABLE, so we realize the diary recording In this method:

clipboard3,3

(2) the transaction code SICF to create a new service node:

clipboard4,4

Use SELECT COUNT (*) The number of entries in the database log table read out, return to the consumer by way of HTTP.

clipboard5,5

(3) in the configuration file prometheus.yml Prometheus's server, add a crawl regularly created in step two Netweaver HTTP service:

clipboard6,6

Line 26 is the SICF service path metrics_path created in the transaction code, line 28 means that grab every 2 seconds. Line 33 is the host name Netweaver server.

Prometheus start the server:

clipboard7,7

Fiori UI to use My Opportunity application, triggering a read request:

clipboard8,8

To see the log table populated with data:

clipboard9,9

localhost: 9090 Prometheus access the console UI, to see the number of read requests collected:

clipboard10,10

Graph panel to switch to, to see the read request for a specified time interval trends, such as the mean FIG past five minutes, the number of read request increases linearly

clipboard11,11
clipboard12,12

For more Jerry's original article, please pay attention to the public number "Wang Zixi":
No public Screenshot

Guess you like

Origin www.cnblogs.com/sap-jerry/p/11968158.html