如何在现有的石墨服务器上使用 asgraphite 写入时间序列数据?

How do I write time-series data using asgraphite on an existing graphite server?

Using this documentation,我知道我可以像这样记录一个一次性值 -

python /opt/aerospike/bin/asgraphite -l 'latency:' --start -g <graphite_host> -p <graphite_port>

我们已经 运行 石墨服务器的详细信息在哪里以及将是什么。

但是,如何指定要记录的名称空间? Graphite 服务器已经有一些命名空间用于记录数据。

另外,这样的命令启动的守护进程是否支持按预设时间间隔进行日志记录?或者我是否需要为此设置一个 cron?

可在此处找到 asgraphite python 脚本的更新版本和文档。

https://github.com/aerospike/aerospike-graphite

您可以使用--interval 来指定向石墨服务器报告预设间隔。

--interval GRAPHITE_INTERVAL How often metrics are sent to graphite (seconds)

您还可以使用以下选项获取所有名称空间和集合(我不相信您可以只指定一个名称空间,所有名称空间都会被报告。:

-n, --namespace Get all namespace statistics
-s, --sets Gather set based statistics

您还可以选择使用前缀。默认前缀是:instances.aerospike.

--prefix GRAPHITE_PREFIX Prefix used when sending metrics to Graphite server (default: instances.aerospike.)