-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pushgateway接口支持用户指定值置换agent_hostname
- Loading branch information
Showing
3 changed files
with
23 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e83f201
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
categraf 支持开启http服务后pushtateway接口后通过配置文件中agent_host_tag从推送的现有指标中指定一个key提取它的值置换到agent_hostname中,同时也直接动态生效模式,在推送给的指标中增加agent_host_tag的label指定的值就是用于置换的key。ignore_hostname在配置文件中为false才会生效。
动态配置方法
ignore_hostname //用于决定是否忽略主机名
ignore_global_labels //是否忽略标签
agent_host_tag //使用指定的key对应的值置换agent_hostname的值,为空的情况下默认使用categraf hostname配置