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
+43-2Lines changed: 43 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: MightySuz
5
5
ms.service: sap-on-azure
6
6
ms.subservice: sap-monitor
7
7
ms.topic: how-to
8
-
ms.date: 01/05/2023
8
+
ms.date: 03/09/2023
9
9
ms.author: sujaj
10
10
#Customer intent: As a developer, I want to configure a Linux provider so that I can use Azure Monitor for SAP solutions for monitoring.
11
11
---
@@ -21,7 +21,7 @@ This content applies to both versions of the service, *Azure Monitor for SAP sol
21
21
22
22
- An Azure subscription.
23
23
- 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).
24
-
- Install the [node exporter version 1.3.0](https://prometheus.io/download/#node_exporter) in each SAP host that you want to monitor, either BareMetal or Azure virtual machine (Azure VM). For more information, see [the node exporter GitHub repository](https://github.com/prometheus/node_exporter).
24
+
- 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 (Azure VM). For more information, see [the node exporter GitHub repository](https://github.com/prometheus/node_exporter).
25
25
26
26
To install the node exporter on Linux:
27
27
@@ -35,6 +35,26 @@ To install the node exporter on Linux:
35
35
36
36
1. The node exporter now starts collecting data. You can export the data at `http://IP:9100/metrics`.
37
37
38
+
## Script to setup Node Exporter
39
+
40
+
```shell
41
+
# To get the latest node exporter version from: https://prometheus.io/download/#node_exporter
To [enable TLS 1.2 or higher](enable-tls-azure-monitor-sap-solutions.md), follow the steps [mentioned here](https://prometheus.io/docs/guides/tls-encryption/)
@@ -74,8 +94,29 @@ When the provider settings validation operation fails with the code ‘Prometheu
74
94
1. Try to restart the node exporter agent:
75
95
1. Go to the folder where you installed the node exporter (the file name resembles `node_exporter-*.*-amd64`).
76
96
1. Run `./node_exporter`.
97
+
1. Adding nohup and & to aboe command decouples the node_exporter from linux machine commandline. If not included node_exporter would stop when the commandline is closed.
77
98
1. Verify that the Prometheus endpoint is reachable from the subnet that you provided while creating the Azure Monitor for SAP solutions resource.
78
99
100
+
## Suggestions
101
+
102
+
### Enabling Node Exporter
103
+
104
+
1. Run `nohup ./node_exporter &` command to enable node_exporter.
105
+
1. Adding nohup and & to aboe command decouples the node_exporter from linux machine commandline. If not included node_exporter would stop when the commandline is closed.
106
+
107
+
### Setting up cron job to start Node exporter on VM restart
108
+
109
+
1. If the target virtual machine is restarted/stopped, node exporter is also stopped, and needs to be manually started again to continue monitoring.
110
+
1. Run `sudo crontab -e` command to open cron file.
111
+
1. Add the command `@reboot cd /path/to/node/exporter && nohup ./node_exporter &` at the end of cron file. This will start node exporter on VM reboot.
112
+
113
+
```shell
114
+
sudo crontab -l > crontab_new
115
+
echo"@reboot cd /path/to/node/exporter && nohup ./node_exporter &">> crontab_new
0 commit comments