content/enterprise_influxdb/v1/administration/monitor/monitor-with-oss.md
Use InfluxDB OSS 2.x, the InfluxDB Enterprise 1.x Template, and Telegraf to monitor one or more InfluxDB Enterprise instances.
Do the following:
Before you begin, make sure you have access to the following:
The InfluxDB Enterprise Monitoring template includes a Telegraf configuration that sends InfluxDB Enterprise metrics to an InfluxDB endpoint and a dashboard that visualizes the metrics.
Log into your InfluxDB OSS UI, go to Settings > Templates, and enter the following template URL:
https://raw.githubusercontent.com/influxdata/community-templates/master/influxdb-enterprise-1x/enterprise.yml
Click Lookup Template, and then click Install Template. InfluxDB OSS imports the template, which includes the following resources:
monitoring-enterprise-1xInfluxDB 1.x Enterpriseenterpriseinfluxdb_host and bucketBy default, InfluxDB Enterprise 1.x has a /metrics endpoint available, which exports Prometheus-style system metrics.
Make sure the /metrics endpoint is enabled. If you've changed the default settings to disable the /metrics endpoint, re-enable these settings.
Navigate to the /metrics endpoint of your InfluxDB Enterprise instance to view the InfluxDB Enterprise system metrics in your browser:
http://localhost:8086/metrics
Or use curl to fetch metrics:
curl http://localhost:8086/metrics
# HELP boltdb_reads_total Total number of boltdb reads
# TYPE boltdb_reads_total counter
boltdb_reads_total 41
# HELP boltdb_writes_total Total number of boltdb writes
# TYPE boltdb_writes_total counter
boltdb_writes_total 28
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
...
Add your InfluxDB OSS account information (URL and organization) to your Telegraf configuration by doing the following:
Go to Load Data > Telegraf in your InfluxDB OSS account, and click InfluxDB Output Plugin at the top-right corner.
Copy the urls, token, organization, and bucket and close the window.
Click monitoring-enterprise-1.x.
Replace urls, token, organization, and bucket under outputs.influxdb_v2 with your InfluxDB OSS account information. Alternatively, store this information in your environment variables and include the environment variables in your configuration.
{{% note %}}
To ensure the InfluxDB Enterprise monitoring dashboard can display the recorded metrics, set the destination bucket name to enterprise_metrics in your telegraf.conf.
{{% /note %}}
Add the Prometheus input plugin to your telegraf.conf. Specify your your InfluxDB Enterprise URL(s) in the urls parameter. For example:
{{< keep-url >}}
[[inputs.prometheus]]
urls = ["http://localhost:8086/metrics"]
username = "$INFLUX_USER"
password = "$INFLUX_PASSWORD"
If you're using unique URLs or have security set up for your /metrics endpoint, configure those options here and save the updated configuration.
For more information about customizing Telegraf, see Configure Telegraf.
Click Save Changes.
Set up Telegraf to scrape metrics from InfluxDB Enterprise to send to your InfluxDB OSS account.
On each InfluxDB Enterprise instance you want to monitor, do the following:
Go to Load Data > Telegraf in your InfluxDB OSS account.
Click Setup Instructions under monitoring-enterprise-1.x.
Complete the Telegraf Setup instructions. If you are using environment variables, set them up now.
{{% note %}} 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. {{% /note %}}
Telegraf runs quietly in the background (no immediate output appears), and Telegraf begins pushing metrics to your InfluxDB OSS account.
To see your data in real time, view the Monitoring dashboard.
Select Boards (Dashboards) in your InfluxDB OSS account.
{{< nav-icon "dashboards" >}}
Click InfluxDB Enterprise Metrics. Metrics appear in your dashboard.
Customize your monitoring dashboard as needed. For example, send an alert in the following cases:
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 OSS account, do the following:
To view the deadman check, click Alerts in the navigation bar of your InfluxDB OSS account.
{{< nav-icon "alerts" >}}
Choose a InfluxDB OSS field or create a new OSS field for your deadman 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.
Save the Check and click on View History of the Check under the gear icon to verify it is running.
To receive a notification message when your deadman check is triggered, create a notification endpoint and rule.
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 PagerDuty or HTTP endpoints (other webhooks) by upgrading your InfluxDB OSS account.
Create a notification rule to set rules for when to send a deadman alert message to your notification endpoint.