Metricbeat 参考指南(步骤5:启动Metricbeat)

步骤5:启动Metricbeat

经过为你的平台发出适当的命令来运行Metricbeat,若是你正在访问一个安全的Elasticsearch集群,请确保已经按照步骤2:配置Metricbeat所述配置了凭证。html

若是使用 init.d脚本在deb或rpm上启动Metricbeat,则不能指定命令行标志(请参阅命令参考),要指定标志,在前台启动Metricbeat。

deb:

sudo service metricbeat start

rpm:

sudo service metricbeat start

docker:

请参阅在Docker上运行Metricbeat。docker

mac:

sudo chown root metricbeat.yml 
sudo chown root modules.d/system.yml 
sudo ./metricbeat -e -c metricbeat.yml -d "publish"

你将以root身份运行Metricbeat,所以须要更改配置文件和modules.d目录中启用的任何配置的全部权,或者指定使用--strict.perms=false运行Metricbeat,参见Beats平台参考中的配置文件全部权和权限segmentfault

win:

PS C:\Program Files\Metricbeat> Start-Service metricbeat

默认状况下,日志文件存储在C:\ProgramData\metricbeat\Logs中。浏览器

在Windows上,关于系统负载和交换使用状况的统计信息目前没有被捕获。

测试Metricbeat安装

要验证你的服务器的统计数据是否存在于Elasticsearch中,请发出如下命令:安全

curl -XGET 'http://localhost:9200/metricbeat-*/_search?pretty'

确保用你的Elasticsearch实例的地址替换localhost:9200服务器

在Windows上,若是没有安装cURL,只需将浏览器指向URL便可。curl

相关文章
相关标签/搜索