Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a data-driven culture:
Visualizations: Fast and flexible client side graphs with a multitude of options. Panel plugins offer many different ways to visualize metrics and logs.
Dynamic Dashboards: Create dynamic & reusable dashboards with template variables that appear as dropdowns at the top of the dashboard.
Explore Metrics: Explore your data through ad-hoc queries and dynamic drilldown. Split view and compare different time ranges, queries and data sources side by side.
Explore Logs: Experience the magic of switching from metrics to logs with preserved label filters. Quickly search through all your logs or streaming them live.
Alerting: Visually define alert rules for your most important metrics. Grafana will continuously evaluate and send notifications to systems like Slack, PagerDuty, VictorOps, OpsGenie.
Mixed Data Sources: Mix different data sources in the same graph! You can specify a data source on a per-query basis. This works for even custom datasources.
1 安装Granfana
1.1 下载
1
2
3
4
wget https://dl.grafana.com/oss/release/grafana-6.5.2.linux-amd64.tar.gz
tar -zxf grafana-6.5.2.linux-amd64.tar.gz
mv grafana-6.5.2 /usr/local/grafana
#################################### Database ############################[database]# You can configure the database connection by specifying type, host, name, user and password# as separate properties or as on string using the url property.# Either "mysql", "postgres" or "sqlite3", it's your choicetype= mysql
host= grafana-mysql:3306
name= grafana
user= root
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""password=123456# Use either URL or the previous fields to configure the database# Example: mysql://user:secret@host:port/databaseurl= mysql://root:123456@grafana-mysql:3306/grafana
#################################### Server ##############################[server]# The public facing domain name used to access grafana from a browserdomain= monitor.example.com
#################################### Anonymous Auth ######################[auth.anonymous]# enable anonymous accessenabled=true# specify organization name that should be used for unauthenticated usersorg_name= Main Org.
# specify role for unauthenticated usersorg_role= Viewer