Chronograf的定位是:
Chronograf is the user interface component of the InfluxData time series platform. It makes the monitoring and alerting for your infrastructure easy to setup and maintain. It is simple to use and includes templates and libraries to allow you to rapidly build dashboards with realtime visualizations of your data.
根据官网提示,下载:
1 2 3 4 5 6 7 |
[root@emr-header-1 ~]# wget https://dl.influxdata.com/chronograf/releases/chronograf-1.7.17.x86_64.rpm --2020-01-14 00:57:26-- https://dl.influxdata.com/chronograf/releases/chronograf-1.7.17.x86_64.rpm Resolving dl.influxdata.com (dl.influxdata.com)... 99.84.224.89, 99.84.224.33, 99.84.224.22, ... Connecting to dl.influxdata.com (dl.influxdata.com)|99.84.224.89|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 32072382 (31M) [application/x-redhat-package-manager] Saving to: 'chronograf-1.7.17.x86_64.rpm' |
进行安装即可:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
[root@emr-header-1 ~]# sudo yum localinstall chronograf-1.7.17.x86_64.rpm Loaded plugins: fastestmirror Examining chronograf-1.7.17.x86_64.rpm: chronograf-1.7.17-1.x86_64 Marking chronograf-1.7.17.x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package chronograf.x86_64 0:1.7.17-1 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================================================================================================================================== Package Arch Version Repository ======================================================================================================================================================================================================================================================================== Installing: chronograf x86_64 1.7.17-1 /chronograf-1.7.17.x86_64 Transaction Summary ======================================================================================================================================================================================================================================================================== Install 1 Package Total size: 93 M Installed size: 93 M Is this ok [y/d/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : chronograf-1.7.17-1.x86_64 Created symlink from /etc/systemd/system/multi-user.target.wants/chronograf.service to /usr/lib/systemd/system/chronograf.service. Verifying : chronograf-1.7.17-1.x86_64 Installed: chronograf.x86_64 0:1.7.17-1 Complete! |
安装完成后直接使用chronograf命令即可启动,默认端口为8888:
1 2 3 |
[root@emr-header-1 ~]# chronograf ERRO[0000] listen tcp 0.0.0.0:8888: bind: address already in use component=server 2020/01/14 01:05:24 listen tcp 0.0.0.0:8888: bind: address already in use |
按照https://docs.influxdata.com/chronograf/v1.7/administration/configuration/中的说法新建配置文件/etc/default/chronograf:
1 2 |
HOST=0.0.0.0 PORT=18888 |
然后以服务方式启动:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@emr-header-1 ~]# systemctl restart chronograf [root@emr-header-1 ~]# systemctl status chronograf ● chronograf.service - Open source monitoring and visualization UI for the entire TICK stack. Loaded: loaded (/usr/lib/systemd/system/chronograf.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2020-01-14 10:44:43 CST; 10s ago Docs: https://www.influxdata.com/time-series-platform/chronograf/ Main PID: 31562 (chronograf) CGroup: /system.slice/chronograf.service └─31562 /usr/bin/chronograf Jan 14 10:44:43 emr-header-1.cluster-149038 systemd[1]: Started Open source monitoring and visualization UI for the entire TICK stack.. Jan 14 10:44:43 emr-header-1.cluster-149038 systemd[1]: Starting Open source monitoring and visualization UI for the entire TICK stack.... Jan 14 10:44:49 emr-header-1.cluster-149038 chronograf[31562]: time="2020-01-14T10:44:49+08:00" level=info msg="Running migration 59b0cda4fc7909ff84ee5c4f9cb4b655b6a26620" Jan 14 10:44:49 emr-header-1.cluster-149038 chronograf[31562]: time="2020-01-14T10:44:49+08:00" level=info msg="Serving chronograf at http://[::]:18888" component=server Jan 14 10:44:49 emr-header-1.cluster-149038 chronograf[31562]: time="2020-01-14T10:44:49+08:00" level=info msg="Reporting usage stats" component=usage freq=24h reporting_addr="https://usage.influxdata.com" stats="os,arch,version,cluster_id,uptime" Jan 14 10:44:52 emr-header-1.cluster-149038 chronograf[31562]: time="2020-01-14T10:44:51+08:00" level=info msg="Response: OK" component=server method=GET remote_addr="172.16.0.179:39828" response_time="223.917µs" status=200 [root@emr-header-1 ~]# systemctl enable chronograf |
需要注意,命令行方式直接执行chronograf不会加载/etc/default/chronograf,需要在参数中指定:
1 2 3 |
[root@emr-header-1 ~]# chronograf --host=0.0.0.0 --port=18888 INFO[0000] Serving chronograf at http://[::]:18888 component=server INFO[0000] Reporting usage stats component=usage freq=24h reporting_addr=https://usage.influxdata.com stats=os,arch,version,cluster_id,uptime |
然后即可在通过浏览器操作Chronograf了:
参考文档:
1、https://docs.influxdata.com/chronograf/v1.7/administration/config-options
2、https://github.com/influxdata/influxdata-docker/issues/321
转载时请保留出处,违法转载追究到底:进城务工人员小梅 » Centos 7.4上Chronograf的安装及简单使用