You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/sap/monitor/provider-linux.md
+25-26Lines changed: 25 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Configure Linux provider for Azure Monitor for SAP solutions
2
+
title: Configure Linux provider for Azure Monitor for SAP solutions
3
3
description: This article explains how to configure a Linux OS provider for Azure Monitor for SAP solutions.
4
4
author: MightySuz
5
5
ms.service: sap-on-azure
@@ -18,49 +18,50 @@ In this how-to guide, you learn how to create a Linux OS provider for Azure Moni
18
18
- An Azure subscription.
19
19
- An existing Azure Monitor for SAP solutions resource. To create an Azure Monitor for SAP solutions resource, see the [quickstart for the Azure portal](quickstart-portal.md) or the [quickstart for PowerShell](quickstart-powershell.md).
20
20
- Install the [node exporter latest version](https://prometheus.io/download/#node_exporter) in each SAP host that you want to monitor, either BareMetal or Azure virtual machine (VM). For more information, see the [node exporter GitHub repository](https://github.com/prometheus/node_exporter).
21
+
- Node exporter uses the default port 9100 to expose the metrics. If you want to use a custom port, make sure to open the port in the firewall and use the same port while creating the provider.
22
+
- Default port 9100 or custom port that will be configured for node exporter should be open and listening on the Linux host.
21
23
22
24
To install the node exporter on Linux:
23
25
24
-
1. Run `wget https://github.com/prometheus/node_exporter/releases/download/v*/node_exporter-*.*-amd64.tar.gz`. Replace `*` with the version number.
26
+
Right click on the relevant node exporter version for linux from https://prometheus.io/download/#node_exporter and copy the link address which will be used in the below command.
27
+
For example - https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-amd64.tar.gz
25
28
26
-
1. Run `tar xvfz node_exporter-*.*-amd64.tar.gz`.
29
+
1. Change to the directory where you want to install the node exporter.
30
+
1. Run `wget https://github.com/prometheus/node_exporter/releases/download/v<xxx>/node_exporter-<xxx>.linux-amd64.tar.gz`. Replace `xxx` with the version number.
27
31
28
-
1. Run `cd node_exporter-*.*-amd64`.
32
+
1. Run `tar xvfz node_exporter-<xxx>.linux-amd64.tar.gz`
33
+
34
+
1. Run `cd node_exporter-<xxx>linux-amd64`
29
35
30
36
1. Run `./node_exporter`.
31
37
38
+
1. Run `./node_exporter --web.listen-address=":9100" &`
39
+
32
40
1. The node exporter now starts collecting data. You can export the data at `http://IP:9100/metrics`.
33
41
34
42
## Script to set up the node exporter
35
43
36
44
```shell
37
45
# To get the latest node exporter version from: https://prometheus.io/download/#node_exporter
# Right click on the linux node exporter version and copy the link address which will be used in the below command. For example - https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-amd64.tar.gz
47
+
# Change to the directory where you want to install the node exporter.
### Set up a cron job to start node exporter on a VM restart
55
56
56
57
1. If the target VM is restarted or stopped, node exporter is also stopped. It must be manually started again to continue monitoring.
57
58
1. Run the `sudo crontab -e` command to open a cron file.
58
-
1. Add the command `@reboot cd /path/to/node/exporter && nohup ./node_exporter &` at the end of the cron file. This starts node exporter on a VM reboot.
59
+
1. Add the command `@reboot cd <"add path of nodeexporter"> && nohup ./node_exporter &` at the end of cron file. This starts node exporter on VM reboot.
59
60
60
61
```shell
61
62
# If you do not have a crontab file already, create one by running the command: sudo crontab -e
62
63
sudo crontab -l > crontab_new
63
-
echo"@reboot cd /path/to/node/exporter && nohup ./node_exporter &">> crontab_new
64
+
echo"@reboot cd <"add path of nodeexporter"> && nohup ./node_exporter &">> crontab_new
64
65
sudo crontab crontab_new
65
66
sudo rm crontab_new
66
67
```
@@ -77,9 +78,9 @@ To [enable TLS 1.2 or higher](enable-tls-azure-monitor-sap-solutions.md), follow
77
78
1. Select **Add provider**.
78
79
1. Configure the following settings for the new provider:
79
80
1. For **Type**, select**OS (Linux)**.
80
-
1. For **Name**, enter a name that will be the identifier for the BareMetal instance.
81
+
1. For **Name**, enter a unique name of the provider.
81
82
1. (Optional) Select **Enable secure communication**, choose a certificate type.
82
-
1. For **Node Exporter Endpoint**, enter `http://IP:9100/metrics`.
83
+
1. For **Node Exporter Endpoint**, enter `http://IP:9100/metrics`if default port 9100 is used. If a custom port is used, enter `http://IP:PORT/metrics`. Replace `IP` with the IP address of the Linux host and `PORT` with the custom port number.
83
84
1. For the IP address, use the private IP address of the Linux host. Make sure the host and Azure Monitor forSAP solutions resource arein the same virtual network.
84
85
1. Open firewall port 9100 on the Linux host.
85
86
1. If you're using `firewall-cmd`, run `_firewall-cmd_ _--permanent_ _--add-port=9100/tcp_ ` and then run `_firewall-cmd_ _--reload_`.
@@ -98,13 +99,11 @@ Use these steps to resolve common errors.
98
99
99
100
When the provider settings validation operation fails with the code `PrometheusURLConnectionFailure`:
100
101
101
-
1. Open firewall port 9100 on the Linux host.
102
-
1. If you're using `firewall-cmd`, run `_firewall-cmd_ _--permanent_ _--add-port=9100/tcp_ ` and then run `_firewall-cmd_ _--reload_`.
103
-
1. If you're using `ufw`, run `_ufw_ _allow_ _9100/tcp_` and then run `_ufw_ _reload_`.
102
+
1. Check the default port 9100 or custom port that is configured for node exporter is open and listening on the Linux host.
104
103
1. Try to restart the node exporter agent:
105
-
1. Go to the folder where you installed the node exporter. The file name resembles `node_exporter-*.*-amd64`.
104
+
1. Go to the folder where you installed the node exporter (the file name resembles `node_exporter-<xxxx>-amd64`).
106
105
1. Run `./node_exporter`.
107
-
1. Adding`nohup` and `&` to the preceding command decouples `node_exporter` from the Linux machine command line. If they're not included, `node_exporter` stops when the command line is closed.
106
+
1. Run`nohup ./node_exporter &`commandto enable node_exporter. Adding nohup and & to above command decouples the node_exporter from linux machine commandline. If not includednode_exporter would stop when the commandline is closed.
108
107
1. Verify that the Prometheus endpoint is reachable from the subnet that you provided when you created the Azure Monitor for SAP solutions resource.
0 commit comments