Puppeteer is a library that allows you to run Chrome without displaying a screen from Node.js.
You can scrape, type on the screen, press buttons, and take screenshots while running Chrome without a screen.
If you are interested, please search for "headless browser".
Let's create a snapshot URL with Application Logging Service.
Access the Application Logging Service.
This time, we want to see the memory usage graph, so we'll switch the graph to display.
A graph of CPU and memory trends was displayed.
Change the conditions so that we can check the changes over the past 24 hours.
A snapshot URL like the one below will be generated.
https://logs.cf.eu10-004.hana.ondemand.com/goto/(32 digit hash value)
We can check the memory usage for the past 24 hours just by accessing this snapshot URL directly.
Also, although I did not set a filter this time, the snapshot URL also remembers the filter settings.
Snapshot URL is very useful !!
However, I created a tool for people who find it troublesome/forgetful just to open their browser every day.
https://github.com/unosistema/SAPBTPLoggingCapture
Please clone the program from the GitHub repository above and rewrite some of the programs.
Please rewrite the three variables in app.js
// Change here!!
const btp_application_logging_snapshot_url = "xxxxxxxxxxxxxxxxxxxxxxx"; // ex. https://logs.cf.eu10-004.hana.ondemand.com/goto/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
const sap_username = "xxxxxx@xxxxxxxxxxx.com"; // Your SAP UniversalID(e-mail)
const sap_password = "xxxxxxxxxxxx"; // Your SAP UniversalID Password
Open a command prompt or terminal, move to the program directory, and install the library using the command below.
npm install
Run the program using the following command from the command prompt or terminal.
node app.js
Wait about a minute and a screenshot will be generated.
When you open the PNG file, you will see a screenshot of the graph for the past 24 hours.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
4 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |