Monitor InfluxDB OSS using a template
Do the following:
- Review requirements
- Install the InfluxDB OSS Monitoring template
- Set up InfluxDB OSS for monitoring
- Set up Telegraf
- View the Monitoring dashboard
- (Optional) Alert when metrics stop reporting
- (Optional) Create a notification endpoint and rule
Before you begin, make sure you have access to the following:
- InfluxDB Cloud account (sign up for free here)
- Command line access to a machine running InfluxDB OSS 2.x and permissions to install Telegraf on this machine
- Internet connectivity from the machine running InfluxDB OSS 2.x and Telegraf to InfluxDB Cloud
- Sufficient resource availability to install the template (InfluxDB Cloud Free Plan accounts include resource limits)
Install the InfluxDB OSS Monitoring template
The InfluxDB OSS Monitoring template includes a Telegraf configuration that sends InfluxDB OSS metrics to an InfluxDB endpoint and a dashboard that visualizes the metrics.
Go to Settings > Templates in the navigation bar on the left
Under Paste the URL of the Template’s resource manifest file, enter the following template URL:
Click Lookup Template, and then click Install Template. InfluxDB Cloud imports the template, which includes the following resources:
InfluxDB OSS Metrics
- Telegraf configuration
InfluxDB OSS Deadman
Set up InfluxDB OSS for monitoring
By default, InfluxDB OSS 2.x has a
/metrics endpoint available, which exports
internal InfluxDB metrics in Prometheus format.
- Ensure the
/metricsendpoint is enabled. If you’ve changed the default settings to disable the
/metricsendpoint, re-enable these settings.
- Navigate to the
/metricsendpoint of your InfluxDB OSS instance to view the InfluxDB OSS system metrics in your browser:
Set up Telegraf
Set up Telegraf to scrape metrics from InfluxDB OSS to send to your InfluxDB Cloud account.
On each InfluxDB OSS instance you want to monitor, do the following:
Set the following environment variables in your Telegraf environment:
INFLUX_URL: Your InfluxDB Cloud region URL
INFLUX_ORG: Your InfluxDB Cloud organization name
In the InfluxDB Cloud UI, go to Load Data > Telegraf in the left navigation.
Click Setup Instructions under Scrape InfluxDB OSS Metrics.
Complete the Telegraf Setup instructions to start Telegraf using the Scrape InfluxDB OSS Metrics Telegraf configuration stored in InfluxDB Cloud.
For your API token, generate a new token or use an existing All Access token. If you run Telegraf as a service, edit your init script to set the environment variable and ensure its available to the service.
Telegraf runs quietly in the background (no immediate output appears), and begins
pushing metrics to the
oss_metrics bucket in your InfluxDB Cloud account.
View the Monitoring dashboard
To see your data in real time, view the Monitoring dashboard.
Select Dashboards in your InfluxDB Cloud account.
Click InfluxDB OSS Metrics. Metrics appear in your dashboard.
Customize your monitoring dashboard as needed. For example, send an alert in the following cases:
- Users create a new task or bucket
- You’re testing machine limits
- Metrics stop reporting
Alert when metrics stop reporting
The Monitoring template includes a deadman check to verify metrics are reported at regular intervals.
To alert when data stops flowing from InfluxDB OSS instances to your InfluxDB Cloud account, do the following:
- Customize the deadman check to identify the fields you want to monitor.
- Create a notification endpoint and rule to receive notifications when your deadman check is triggered.
Customize the deadman check
To view the deadman check, click Alerts in the navigation bar of your InfluxDB Cloud account.
Choose a InfluxDB OSS field or create a new OSS field for your deadman alert:
- Click Create and select Deadman Check in the dropdown menu.
- Define your query with at least one field.
- Click Submit and Configure Check. When metrics stop reporting, you’ll receive an alert.
Start under Schedule Every, set the amount of time to check for data.
Set the amount of time to wait before switching to a critical alert.
Click to save the check.
Create a notification endpoint and rule
Create a notification endpoint
InfluxData supports different endpoints: Slack, PagerDuty, and HTTP. Slack is free for all users, while PagerDuty and HTTP are exclusive to the Usage-Based Plan.
Send a notification to Slack
Create a Slack Webhooks.
Go to Alerts > Alerts in the left navigation menu and then click Notification Endpoints.
Click Create, and enter a name and description for your Slack endpoint.
Enter your Slack Webhook under Incoming Webhook URL and click Create Notification Endpoint.
Send a notification to PagerDuty or HTTP
Send a notification to PagerDuty or HTTP endpoints (other webhooks) by upgrading your InfluxDB Cloud account.
Create a notification rule
Create a notification rule to set rules for when to send a deadman alert message to your notification endpoint.
Go to Alerts > Alerts in the left navigation menu and then click Notification Rules.
Click Create, and then provide the required information.
Click Create Notification Rule.
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
InfluxDB Cloud and InfluxDB Enterprise customers can contact InfluxData Support.