Skip to content

Commit 64ab6f8

Browse files
authored
Merge pull request #234595 from M2skills/momakhij/crontab_monitor
Crontab Script + Monitor Fields Description
2 parents a718561 + 4801412 commit 64ab6f8

File tree

2 files changed

+31
-21
lines changed

2 files changed

+31
-21
lines changed

articles/sap/monitor/provider-linux.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.author: sujaj
1313

1414
[!INCLUDE [Azure Monitor for SAP solutions public preview notice](./includes/preview-azure-monitor.md)]
1515

16-
In this how-to guide, you'll learn to create a Linux OS provider for *Azure Monitor for SAP solutions* resources.
16+
In this how-to guide, you learn to create a Linux OS provider for *Azure Monitor for SAP solutions* resources.
1717

1818
This content applies to both versions of the service, *Azure Monitor for SAP solutions* and *Azure Monitor for SAP solutions (classic)*.
1919

@@ -43,7 +43,7 @@ wget https://github.com/prometheus/node_exporter/releases/download/v*/node_expor
4343
tar xvfz node_exporter-*.*-amd64.tar.gz
4444
if [[ "$(grep '^ID=' /etc/*-release)" == *"rhel"* ]]; then
4545
echo "Open firewall port 9100 on the Linux host"
46-
sudo apt install firewalld -y
46+
yum install firewalld -y
4747
systemctl start firewalld
4848
firewall-cmd --zone=public --permanent --add-port 9100/tcp
4949
else
@@ -55,6 +55,20 @@ cd node_exporter-*.*-amd64
5555
nohup ./node_exporter --web.listen-address=":9100" &
5656
```
5757

58+
### Setting up cron job to start Node exporter on VM restart
59+
60+
1. If the target virtual machine is restarted/stopped, node exporter is also stopped, and needs to be manually started again to continue monitoring.
61+
1. Run `sudo crontab -e` command to open cron file.
62+
2. Add the command `@reboot cd /path/to/node/exporter && nohup ./node_exporter &` at the end of cron file. This starts node exporter on VM reboot.
63+
64+
```shell
65+
# if you do not have a crontab file already, create one by running the command: sudo crontab -e
66+
sudo crontab -l > crontab_new
67+
echo "@reboot cd /path/to/node/exporter && nohup ./node_exporter &" >> crontab_new
68+
sudo crontab crontab_new
69+
sudo rm crontab_new
70+
```
71+
5872
## Prerequisites to enable secure communication
5973

6074
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/)
@@ -104,19 +118,6 @@ When the provider settings validation operation fails with the code ‘Prometheu
104118
1. Run `nohup ./node_exporter &` command to enable node_exporter.
105119
1. Adding nohup and & to above command decouples the node_exporter from linux machine commandline. If not included node_exporter would stop when the commandline is closed.
106120

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
116-
sudo crontab crontab_new
117-
sudo rm crontab_new
118-
```
119-
120121
## Next steps
121122

122123
> [!div class="nextstepaction"]

articles/sap/monitor/quickstart-portal.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,38 +26,47 @@ If you don't have an Azure subscription, create a [free](https://azure.microsoft
2626

2727
1. Sign in to the [Azure portal](https://portal.azure.com).
2828

29-
1. In Azure **Search**, select **Azure Monitor for SAP solutions**.
29+
2. In Azure **Search**, select **Azure Monitor for SAP solutions**.
3030

3131
![Diagram that shows Azure Monitor for SAP solutions Quick Start.](./media/quickstart-portal/azure-monitor-quickstart-1-new.png)
3232

3333

34+
3. On the **Basics** tab, provide the required values.
35+
1. **Workload Region** is the region where the monitoring resources are created, make sure to select a region that is same as your virtual network.
36+
2. **Service Region** is where proxy resource gets created which manages monitoring resources deployed in the workload region. Service region is automatically selected based on your Workload Region selection.
37+
3. For **Virtual Network** field select a virtual network, which has connectivity to your SAP systems.
38+
4. For the **Subnet** field, select a subnet that has connectivity to your SAP systems. You can use an existing subnet or create a new subnet. Make sure that you select a subnet, which is an **IPv4/25 block or larger**.
39+
5. For **Log Analytics Workspace**, you can use an existing Log Analytics workspace or create a new one. If you create a new workspace, it will be created inside the managed resource group along with other monitoring resources.
40+
6. When entering **managed resource group** name, make sure to use a unique name. This name is used to create a resource group, which will contain all the monitoring resources. Managed Resource Group name cannot be changed once the resource is created.
3441

35-
1. On the **Basics** tab, provide the required values. If applicable, you can use an existing Log Analytics workspace.
36-
42+
<br/>
3743

3844
![Diagram that shows Azure Monitor for SAP solutions Quick Start 2.](./media/quickstart-portal/azure-monitor-quickstart-2-new.png)
3945

46+
4. On the **Providers** tab, you can start creating providers along with the monitoring resource. You can also create providers later by navigating to the **Providers** tab in the Azure Monitor for SAP solutions resource.
47+
5. On the **Tags** tab, you can add tags to the monitoring resource. Make sure to add all the mandatory tags in case you have a tag policy in place.
48+
6. On the **Review + create** tab, review the details and click **Create**.
49+
4050

4151
## Create Azure Monitor for SAP solutions (classic) monitoring resource
4252

4353
1. Sign in to the [Azure portal](https://portal.azure.com).
4454

4555
1. In Azure **Marketplace** or **Search**, select **Azure Monitor for SAP solutions (classic)**.
4656

47-
![Diagram shows Azure Monitor for SAP solutions classic quick start page.](./media/quickstart-portal/azure-monitor-quickstart-classic.png)
57+
![Diagram shows Azure Monitor for SAP solutions classic quick start page.](./media/quickstart-portal/azure-monitor-quickstart-classic.png)
4858

4959

5060
1. On the **Basics** tab, provide the required values. If applicable, you can use an existing Log Analytics workspace.
5161

5262
:::image type="content" source="./media/quickstart-portal/azure-monitor-quickstart-2.png" alt-text="Screenshot that shows configuration options on the Basics tab." lightbox="./media/quickstart-portal/azure-monitor-quickstart-2.png":::
5363

54-
When you're selecting a virtual network, ensure that the systems you want to monitor are reachable from within that virtual network.
64+
When you're selecting a virtual network, ensure that the systems you want to monitor are reachable from within that virtual network.
5565

5666
> [!IMPORTANT]
5767
> Selecting **Share** for **Share data with Microsoft support** enables our support teams to help you with troubleshooting. This feature is available only for Azure Monitor for SAP solutions (classic)
5868
5969

60-
6170
## Next steps
6271

6372
Learn more about Azure Monitor for SAP solutions.

0 commit comments

Comments
 (0)