English | 中文
A distributed, scalable, lightning-fast graph database
Nebula Graph exporter for Prometheus.
Some of the metrics collections are:
- Graphd's query metrics
- Metad's heartbeat metrics
- Storaged's CRUD edge and vertex metrics
$ git clone https://github.com/vesoft-inc/nebula-stats-exporter.git
$ cd nebula-stats-exporter
$ make build
$ ./nebula-stats-exporter --help
usage: nebula-stats-exporter [<flags>]
Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).
--listen-address=":9100" Address of nebula metrics server
--namespace="default" The namespace which nebula in
--cluster="" The cluster name for nebula, default get metrics of all clusters in the namespace.
--kube-config="" The kubernetes config file
--max-request=40 Maximum number of parallel scrape requests. Use 0 to disable.
--bare-metal Whether running in bare metal environment
--bare-metal-config="/config.yaml"
The bare metal config file
--version Show application version.
The --bare-metal-config
file examples:
clusters: # a list of clusters you want to monitor
- name: nebula # the cluster name
instances: # a list of instances for this cluster
- name: metad0 # the instance name
endpointIP: 192.168.10.131 # the ip of this instance
endpointPort: 19559 # the port of this instance
componentType: metad # the component type of this instance, optional value metad, graphd and storaged.
- ...
# Deprecated: use clusters instead.
nebulaItems: # same as clusters/instances, the default cluster name is '_nebula'
- instanceName: metad0 # same as clusters/instances/name
endpointIP: 192.168.10.131 # same as clusters/instances/endpointIP
endpointPort: 19559 # same as clusters/instances/endpointPort
componentType: metad # same as clusters/instances/componentType
- ...
See config.yaml for details.
Add a block to the scrape_configs
of your prometheus.yaml config file:
scrape_configs:
- job_name: 'nebula-stats-exporter'
static_configs:
- targets: ['<<NEBULA_STATS_EXPORTER_HOSTNAME>>:9100'] # nebula-stats-exporter metrics endpoints
And adjust the host name NEBULA_STATS_EXPORTER_HOSTNAME
accordingly.
$ docker run -d --restart=always --name nebula-stats-exporter -p 9100:9100 \
-v "<<PATH_OF_CONFIG_FILE>>:/config.yaml" \
vesoft/nebula-stats-exporter:v0.0.5 --bare-metal --bare-metal-config=/config.yaml
# For example:
$ docker run -d --restart=always --name nebula-stats-exporter -p 9100:9100 \
-v "$(pwd)/deploy/bare-metal/config.yaml:/config.yaml" \
vesoft/nebula-stats-exporter:v0.0.5 --bare-metal --bare-metal-config=/config.yaml
Here is an introduction to deploy on Bare Metal.
Here is an introduction to deploy on Kubernetes.
Please import nebula-grafana.json into your grafana.
Wait a while, then you can see the charts in grafana.