Skip to content

Commit dd58704

Browse files
authored
Merge pull request #109 from flashcatcloud/f-nagios-dev
F nagios dev
2 parents 407427d + 921a797 commit dd58704

File tree

145 files changed

+14025
-813
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+14025
-813
lines changed

flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.0 Standard Alert Integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Field|Required|Type|Description
7777

7878
Field|Required|Type|Description
7979
:-:|:-:|:-:|:---
80-
| title_rule | Yes | string | Alert title, no more than `512` characters, will be truncated if exceeded.<br><br>Supports dynamic title generation based on alert content, see [Customizing Incidents](https://docs.flashcat.cloud/en/flashduty/customize-incident-attrs) for generation rules.
80+
| title_rule | Yes | string | Alert title, no more than `512` characters, will be truncated if exceeded.<br><br>Supports dynamic title generation based on alert content, see [Customizing Incidents](https://docs.flashcat.cloud/en/on-call/integration/alert-integration/alert-pipelines) for generation rules.
8181
| event_status | Yes | string | Alert status.<br><br>Enumerated values (case-sensitive): *Critical*, *Warning*, *Info*, *Ok*.<br><br>When specified as Ok, it means automatic recovery of the alert.
8282
| alert_key | No | string | Alert identifier, used to update or automatically recover existing alerts.<br><br>You can customize this value, but it cannot exceed `255` characters. You can also rely on system auto-generation, this value will be returned in the response.<br><br>If you're reporting a recovery event, this value must exist.
8383
| description | No | string | Alert description, no more than `2048` characters, will be truncated if exceeded.

flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.1 Email Integration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,4 @@ attachment_stripped = true
9898
---
9999

100100
Currently, all alerts pushed to Flashduty through the email integration are set to Warning severity. However, you can customize the severity using the [alert pipeline](https://docs.flashcat.cloud/en/on-call/integration/alert-integration/alert-pipelines).
101+
Lines changed: 269 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,269 @@
1+
---
2+
title: "Nagios Integration"
3+
description: "Synchronize Nagios alert events to Flashduty via script to achieve automated alert noise reduction"
4+
date: "2025-05-19T10:00:00+08:00"
5+
url: "https://docs.flashcat.cloud/en/flashduty/nagios-integration-guide"
6+
---
7+
8+
Sync Nagios alert events to Flashduty via script to achieve automated alert noise reduction.
9+
10+
<div class="hide">
11+
12+
## In Flashduty
13+
---
14+
You can obtain an integration push URL through either of these two methods:
15+
16+
### Using Private Integration
17+
18+
Choose this method when you don't need to route alert events to different channels - it's simpler.
19+
20+
<details>
21+
<summary>Expand</summary>
22+
23+
1. Go to the Flashduty console, select **Channel**, and enter a channel's details page
24+
2. Select the **Integrations** tab, click **Add Integration** to enter the integration page
25+
3. Choose **Nagios** integration and click **Save** to generate a card
26+
4. Click the generated card to view the **Push URL**, copy it for later use, and you're done
27+
28+
</details>
29+
30+
### Using Shared Integration
31+
32+
Choose this method when you need to route alerts to different channels based on the alert event payload.
33+
34+
<details>
35+
<summary>Expand</summary>
36+
37+
1. Go to the Flashduty console, select **Integration Center=>Alert Events** to enter the integration selection page
38+
2. Select **Nagios** integration:
39+
- **Integration Name**: Define a name for this integration
40+
3. Configure the default route and select the corresponding channel (after the integration is created, you can go to `Route` to configure more routing rules)
41+
4. Click **Save** and copy the newly generated **push URL** for later use
42+
5. Done
43+
44+
</details>
45+
</div>
46+
47+
48+
## In Nagios
49+
50+
---
51+
52+
Nagios installation paths may vary depending on the system and installation method. Please adjust the paths in the following configuration according to your actual environment.
53+
54+
### Step 1: Download Notification Script
55+
56+
<div class="md-block">
57+
58+
Log in to the Nagios Server host and download the notification script to the Nagios plugin directory:
59+
60+
- **Debian/Ubuntu systems** (typically `/usr/lib/nagios/plugins/`):
61+
62+
```bash
63+
cd /usr/lib/nagios/plugins/
64+
wget --header="Referer: https://console.flashcat.cloud" https://download.flashcat.cloud/flashduty/integration/nagios/send_to_flashduty.sh
65+
chmod +x send_to_flashduty.sh
66+
```
67+
68+
- **RHEL/CentOS systems** (typically `/usr/lib64/nagios/plugins/`):
69+
70+
```bash
71+
cd /usr/lib64/nagios/plugins/
72+
wget --header="Referer: https://console.flashcat.cloud" https://download.flashcat.cloud/flashduty/integration/nagios/send_to_flashduty.sh
73+
chmod +x send_to_flashduty.sh
74+
```
75+
76+
- **Source installation** (typically `/usr/local/nagios/libexec/`):
77+
78+
```bash
79+
cd /usr/local/nagios/libexec/
80+
wget --header="Referer: https://console.flashcat.cloud" https://download.flashcat.cloud/flashduty/integration/nagios/send_to_flashduty.sh
81+
chmod +x send_to_flashduty.sh
82+
```
83+
84+
#### Note: The script uses the `curl` command. Please ensure curl is installed on your Nagios Server.
85+
86+
</div>
87+
88+
### Step 2: Create Flashduty Configuration File
89+
90+
<div class="md-block">
91+
92+
Download the Flashduty configuration file to the Nagios configuration directory:
93+
94+
- **Debian/Ubuntu systems** (typically `/etc/nagios3/conf.d/`):
95+
96+
```bash
97+
cd /etc/nagios3/conf.d/
98+
wget --header="Referer: https://console.flashcat.cloud" https://download.flashcat.cloud/flashduty/integration/nagios/flashduty.cfg
99+
```
100+
101+
- **RHEL/CentOS systems** (typically `/etc/nagios/objects/`):
102+
103+
```bash
104+
cd /etc/nagios/objects/
105+
wget --header="Referer: https://console.flashcat.cloud" https://download.flashcat.cloud/flashduty/integration/nagios/flashduty.cfg
106+
```
107+
108+
- **Source installation** (typically `/usr/local/nagios/etc/objects/`):
109+
110+
```bash
111+
cd /usr/local/nagios/etc/objects/
112+
wget --header="Referer: https://console.flashcat.cloud" https://download.flashcat.cloud/flashduty/integration/nagios/flashduty.cfg
113+
```
114+
115+
</div>
116+
117+
### Step 3: Modify Configuration File
118+
119+
<div class="md-block">
120+
121+
Edit the downloaded `flashduty.cfg` file and modify the following:
122+
123+
1. Replace the `pager` field value with the integration push URL obtained from the Flashduty console
124+
2. Modify the script path in `command_line` according to your Nagios installation path
125+
126+
Configuration file example:
127+
128+
```
129+
define contact {
130+
contact_name Flashduty
131+
alias Flashduty Alert Receiver
132+
service_notification_commands notify-service-by-Flashduty
133+
host_notification_commands notify-host-by-Flashduty
134+
service_notification_options w,u,c,r
135+
host_notification_options d,u,r
136+
service_notification_period 24x7
137+
host_notification_period 24x7
138+
pager <YOUR_FLASHDUTY_PUSH_URL>
139+
}
140+
141+
142+
define command {
143+
command_name notify-host-by-Flashduty
144+
command_line <NAGIOS_PLUGIN_PATH>/send_to_flashduty.sh type=HOST WEBHOOK_URL="$CONTACTPAGER$" hostname="$HOSTNAME$" state="$HOSTSTATE$" output="$HOSTOUTPUT$" notification_type="$NOTIFICATIONTYPE$" time="$LONGDATETIME$" host_address="$HOSTADDRESS$" host_alias="$HOSTALIAS$" check_command="$HOSTCHECKCOMMAND$"
145+
}
146+
147+
define command {
148+
command_name notify-service-by-Flashduty
149+
command_line <NAGIOS_PLUGIN_PATH>/send_to_flashduty.sh type=SERVICE WEBHOOK_URL="$CONTACTPAGER$" hostname="$HOSTNAME$" state="$SERVICESTATE$" output="$SERVICEOUTPUT$" notification_type="$NOTIFICATIONTYPE$" time="$LONGDATETIME$" host_address="$HOSTADDRESS$" service_desc="$SERVICEDESC$" host_alias="$HOSTALIAS$" max_attempts="$MAXSERVICEATTEMPTS$"
150+
}
151+
```
152+
153+
Parameter descriptions:
154+
- `pager`: Flashduty push URL, the integration push URL obtained from the Flashduty console
155+
- `<NAGIOS_PLUGIN_PATH>`: Replace with the actual script path, such as `/usr/local/nagios/libexec`
156+
- `service_notification_options`: Service alert notification options, w=warning, u=unknown, c=critical, r=recovery
157+
- `host_notification_options`: Host alert notification options, d=down, u=unreachable, r=recovery
158+
159+
**To include additional information in alerts, you can append parameters in `key=value` format at the end of `command_line`, for example: `environment="production" region="$_HOSTREGION$"`. These parameters will be pushed to Flashduty as labels.**
160+
161+
</div>
162+
163+
### Step 4: Include Configuration File
164+
165+
<div class="md-block">
166+
167+
If you are using **RHEL/CentOS systems** or **source installation**, you need to include the Flashduty configuration file in the Nagios main configuration file.
168+
169+
- **RHEL/CentOS systems**: Edit `/etc/nagios/nagios.cfg` and add:
170+
171+
```
172+
cfg_file=/etc/nagios/objects/flashduty.cfg
173+
```
174+
175+
- **Source installation**: Edit `/usr/local/nagios/etc/nagios.cfg` and add:
176+
177+
```
178+
cfg_file=/usr/local/nagios/etc/objects/flashduty.cfg
179+
```
180+
181+
:::tips
182+
Debian/Ubuntu systems typically auto-load all configuration files in the `/etc/nagios3/conf.d/` directory, so manual inclusion is not required.
183+
:::
184+
185+
</div>
186+
187+
### Step 5: Add Flashduty to Contact Group
188+
189+
<div class="md-block">
190+
191+
Edit the contacts configuration file to add the Flashduty contact to the `admins` contact group (or another contact group you use):
192+
193+
- **Debian/Ubuntu systems**: Edit `/etc/nagios3/conf.d/contacts_nagios2.cfg`
194+
- **RHEL/CentOS systems**: Edit `/etc/nagios/objects/contacts.cfg`
195+
- **Source installation**: Edit `/usr/local/nagios/etc/objects/contacts.cfg`
196+
197+
Find the contact group definition and add Flashduty to the members list:
198+
199+
```
200+
define contactgroup {
201+
contactgroup_name admins
202+
alias Nagios Administrators
203+
members nagiosadmin,Flashduty
204+
}
205+
```
206+
207+
</div>
208+
209+
### Step 6: Verify Configuration and Restart Service
210+
211+
<div class="md-block">
212+
213+
1. Verify the Nagios configuration file:
214+
215+
- **Debian/Ubuntu systems**:
216+
217+
```bash
218+
/usr/sbin/nagios3 -v /etc/nagios3/nagios.cfg
219+
```
220+
221+
- **RHEL/CentOS systems**:
222+
223+
```bash
224+
/usr/sbin/nagios -v /etc/nagios/nagios.cfg
225+
```
226+
227+
- **Source installation**:
228+
229+
```bash
230+
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
231+
```
232+
233+
2. If verification passes, restart the Nagios service:
234+
235+
```bash
236+
# Debian/Ubuntu
237+
systemctl restart nagios3
238+
# or
239+
service nagios3 restart
240+
241+
# RHEL/CentOS/Source installation
242+
systemctl restart nagios
243+
# or
244+
service nagios restart
245+
```
246+
247+
3. After configuration is complete, Nagios will automatically push alerts to Flashduty when detected
248+
249+
</div>
250+
251+
## Status Mapping
252+
253+
---
254+
255+
<div class="md-block">
256+
257+
Nagios to Flashduty alert severity mapping:
258+
259+
| Nagios | Flashduty | Status |
260+
| --------------- | --------- | -------- |
261+
| CRITICAL | Critical | Critical |
262+
| DOWN | Critical | Critical |
263+
| UNREACHABLE | Critical | Critical |
264+
| WARNING | Warning | Warning |
265+
| OK | Ok | Recovered |
266+
| UP | Ok | Recovered |
267+
| UNKNOWN | Info | Info |
268+
269+
</div>

flashduty/en/2. RUM/1. Getting Started/1. Introduction.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,35 @@ url: "https://docs.flashcat.cloud/en/flashduty/rum/introduction?nav=01JCQ7A4N4WR
99

1010
---
1111

12-
Real User Monitoring (RUM) is an innovative technology that tracks and analyzes the actual experience of real users as they interact with your web applications. Unlike traditional simulation testing, RUM collects data directly from users' browsers, showing you how your application performs in real-world conditions.
12+
Real User Monitoring (RUM) is an innovative technology that tracks and analyzes the actual experience of real users as they interact with your Web and native applications. Unlike traditional simulation testing, RUM collects data directly from users, showing you how your application performs in real-world conditions.
1313

14-
Flashduty RUM enables developers, operations engineers, and business stakeholders to gain intuitive insights into application performance, promptly identify issues, and continuously optimize user experience—all powered by real-time collection and analysis of end-user browser data.
14+
Flashduty RUM enables developers, operations engineers, and business stakeholders to gain intuitive insights into application performance, promptly identify issues, and continuously optimize user experience—all powered by real-time collection and analysis of end-user data.
1515

1616
### Core Benefits
1717

18-
1. **Performance monitoring**: Monitor key performance metrics in real-time, including page load time, resource loading efficiency, and JavaScript execution status, to quickly identify bottlenecks affecting user experience.
19-
20-
2. **Error monitoring**: Automatically capture JavaScript errors, network failures, and other issues impacting users, with rich contextual information to help quickly locate and resolve problems.
21-
22-
3. **Insights**: Analyze performance of images, scripts, API calls, and other resources in depth to optimize loading speed, understand data trends, reduce bandwidth consumption, and minimize errors.
18+
1. **Quickly identify root causes**: Perform multi-dimensional drill-down analysis through the Session Explorer linking various events (page visits, resource loading, user interactions, etc.), combined with trace linking to connect frontend and backend data, quickly locating problem sources from user side to server side.
19+
2. **Comprehensively improve application stability**: Automatically capture JavaScript errors, client crashes, network failures, and other issues affecting users, providing rich contextual information to discover and resolve problems before they spread.
20+
3. **Continuously optimize user experience**: Master key performance metrics in real-time including page load time, resource loading efficiency, and JavaScript execution status, scientifically guiding performance optimization based on real user data, eliminating guesswork.
21+
4. **Data-driven decision optimization**: Deeply understand APP crash situations, resource performance, and data trends through analysis dashboards, providing reliable basis for product iteration and business decisions.
22+
5. **Build a complete observability system**: Deeply integrated with the Flashduty monitoring system, enabling incident alerts through collaboration spaces, connecting frontend and backend monitoring links, and establishing a unified observability platform.
2323

2424
## Why Choose Flashduty RUM?
2525

2626
---
2727

28-
1. **Comprehensive visualization**: Gain a holistic understanding of application performance across different browsers, devices, and regions from the user's perspective.
29-
30-
2. **Early warning**: Identify and resolve issues before they become widespread, significantly improving application stability.
28+
1. **Out-of-the-box**: Quick integration in 5 minutes, no complex configuration needed, supporting unified monitoring across Web, iOS, and Android, reducing integration and maintenance costs.
3129

32-
3. **Data-driven**: Develop optimization strategies based on real user data, eliminating subjective assumptions.
30+
2. **Ecosystem integration**: Deeply integrated with Flashduty and Flashcat monitoring systems, enabling incident alerts through collaboration spaces, combined with trace linking to achieve end-to-end problem identification and analysis across frontend and backend, providing a one-stop observability solution.
3331

34-
4. **Ecosystem integration**: Deeply integrated with the Flashduty monitoring system, enabling incident alerts through channels and combining trace tracking for end-to-end problem identification and analysis across frontend and backend.
32+
3. **Lightweight and efficient**: SDK uses a lightweight design that minimizes impact on user experience while ensuring complete data collection.
3533

36-
5. **Lightweight and efficient**: JavaScript SDK uses a lightweight design that minimizes performance impact while ensuring robust data collection.
34+
4. **Flexible deployment**: Supports both SaaS cloud services and private deployment modes to meet different enterprise data security and compliance requirements.
3735

3836
## How RUM Works
3937

4038
---
4139

42-
Flashduty RUM collects data by embedding a lightweight JavaScript SDK in your web application. The SDK primarily collects the following types of data:
40+
Flashduty RUM collects data by embedding a lightweight SDK in your Web application or native (Android, iOS) application. The SDK primarily collects the following types of data:
4341

4442
1. **Page visits**: Records page loading processes, navigation timing, and user environment information.
4543

@@ -49,7 +47,7 @@ Flashduty RUM collects data by embedding a lightweight JavaScript SDK in your we
4947

5048
4. **Error information**: Captures JavaScript exceptions, network failures, and other issues.
5149

52-
5. **Long task tracking**: Monitors time-consuming JavaScript tasks that might cause page stuttering.
50+
5. **Long task tracking**: Monitors time-consuming tasks that might cause page stuttering.
5351

5452
This data is transmitted to the Flashduty backend in real-time for processing and analysis, ultimately presented as intuitive dashboards and reports to help you fully understand your application's performance and user experience.
5553

@@ -58,5 +56,8 @@ This data is transmitted to the Flashduty backend in real-time for processing an
5856
To learn more about RUM capabilities and best practices, we recommend reading the following documentation:
5957

6058
- [Quick Start](https://docs.flashcat.cloud/en/flashduty/rum/getting-started?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5) — Build your user monitoring system from scratch and quickly optimize user experience.
59+
- [Web Integration](https://docs.flashcat.cloud/en/flashduty/rum/web-sdk-integration?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5) — Quick integration for Web applications
60+
- [iOS Integration](https://docs.flashcat.cloud/en/flashduty/rum/ios-sdk-integration?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5) — Quick integration for iOS applications
61+
- [Android Integration](https://docs.flashcat.cloud/en/flashduty/rum/android-sdk-integration?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5) — Quick integration for Android applications
6162
- [Performance Monitoring](https://docs.flashcat.cloud/en/flashduty/rum/performance-overview?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5) — Learn more about performance monitoring features.
62-
- [Error Tracking](https://docs.flashcat.cloud/en/flashduty/rum/error-tracking-overview?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5) — Learn more about error tracking features.
63+
- [Error Tracking](https://docs.flashcat.cloud/en/flashduty/rum/error-tracking-overview?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5) — Learn more about error tracking features.

flashduty/en/2. RUM/1. Getting Started/2. Quick Start.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Get started with Flashduty RUM in just a few simple steps:
1313

1414
### Basic Process
1515

16-
![2025-05-16-10-12-35](https://docs-cdn.flashcat.cloud/imges/png/d07dcc491678ab93ca5fe2302631913a.png)
16+
![2026-01-14-16-52-12](https://docs-cdn.flashcat.cloud/imges/png/8ca04502f817c2aeae91df79a73dd5e4.png)
1717

1818
### Create a RUM Application
1919

@@ -30,11 +30,10 @@ Visit [Application Management](https://docs.flashcat.cloud/en/flashduty/rum/appl
3030
After creating a RUM application, you need to integrate the SDK into your application:
3131

3232
1. Get the SDK integration configuration information from the application details page
33-
2. Choose the appropriate SDK integration method based on your application type:
34-
- npm package import
35-
- CDN import
36-
37-
Visit [SDK Documentation](https://docs.flashcat.cloud/en/flashduty/rum/sdk-integration?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5) for detailed setup instructions.
33+
2. Choose the appropriate SDK integration method based on your application type. Learn more through the following links:
34+
- [Web](https://docs.flashcat.cloud/en/flashduty/rum/web-sdk-integration?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5)
35+
- [iOS](https://docs.flashcat.cloud/en/flashduty/rum/ios-sdk-integration?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5)
36+
- [Android](https://docs.flashcat.cloud/en/flashduty/rum/android-sdk-integration?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5)
3837

3938
### Data Reporting
4039

@@ -61,6 +60,4 @@ Visit [Performance Monitoring](https://docs.flashcat.cloud/en/flashduty/rum/perf
6160

6261
### Formal Subscription
6362

64-
Currently, the RUM service is in whitelist public beta, and all features are completely free. When the public beta ends, we will notify you to switch to a formal subscription or cancel the trial.
65-
66-
When officially launched, RUM will be charged based on the number of Sessions, and a certain level of free quota will be provided.
63+
RUM is charged based on the number of Sessions, and a certain level of free quota is provided.

0 commit comments

Comments
 (0)