Prometheus exporter for SakuraCloud metrics.
1.9K
Prometheus exporter for SakuraCloud metrics.
Download the already existing binaries for your platform:
$ ./sakuracloud_exporter <flags>
If you want to use sakuracloud_exporter with systemd, see systemd examples.
Using the standard go install (you must have [Go][golang] already installed in your local machine):
$ go install github.com/sacloud/sakuracloud_exporter
$ sakuracloud_exporter <flags>
To run the SakuraCloud exporter as a Docker container, run:
$ docker run -p 9542:9542 -e SAKURACLOUD_ACCESS_TOKEN=<YOUR-TOKEN> -e SAKURACLOUD_ACCESS_TOKEN_SECRET=<YOUR-SECRET> ghcr.io/sacloud/sakuracloud_exporter
| Flag / Environment Variable | Required | Default | Description |
|---|---|---|---|
--token / SAKURACLOUD_ACCESS_TOKEN | ◯ | API Key(Token) | |
--secret / SAKURACLOUD_ACCESS_TOKEN_SECRET | ◯ | API Key(Secret) | |
--ratelimit/ SAKURACLOUD_RATE_LIMIT | 5 | API request rate limit(maximum:10) | |
--webaddr / WEB_ADDR | :9542 | Exporter's listen address | |
--webpath/ WEB_PATH | /metrics | Metrics request path | |
--no-collector.auto-backup | false | Disable the AutoBackup collector | |
--no-collector.coupon | false | Disable the Coupon collector | |
--no-collector.database | false | Disable the Database collector | |
--no-collector.esme | false | Disable the ESME collector | |
--no-collector.internet | false | Disable the Internet(Switch+Router) collector | |
--no-collector.load-balancer | false | Disable the LoadBalancer collector | |
--no-collector.local-router | false | Disable the LocalRouter collector | |
--no-collector.mobile-gateway | false | Disable the MobileGateway collector | |
--no-collector.nfs | false | Disable the NFS collector | |
--no-collector.proxy-lb | false | Disable the ProxyLB(Enhanced LoadBalancer) collector | |
--no-collector.server | false | Disable the Server collector | |
--no-collector.sim | false | Disable the SIM collector | |
--no-collector.vpc-router | false | Disable the VPCRouter collector | |
--no-collector.zone | false | Disable the Zone collector |
| Flag / Environment Variable | Required | Default | Description |
|---|---|---|---|
--fake-mode / FAKE_MODE | The file path of fake store. If set this, make enabled to fake-store-mode(powered by libsacloud's fake driver) |
Example fake store file(JSON) is here[examples/fake/generate-fake-store-json/example-fake-store.json].
The exporter returns the following metrics:
| Resource Type | Metric Name Prefix |
|---|---|
| AutoBackup | sakuracloud_auto_backup_* |
| Coupon | sakuracloud_coupon_* |
| Database | sakuracloud_database_* |
| ESME | sakuracloud_esme_* |
| Switch+Router | sakuracloud_internet_* |
| LoadBalancer | sakuracloud_loadbalancer_* |
| LocalRouter | sakuracloud_local_router_* |
| MobileGateway | sakuracloud_mobile_gateway_* |
| NFS | sakuracloud_nfs_* |
| ProxyLB | sakuracloud_proxylb_* |
| Server | sakuracloud_server_* |
| SIM | sakuracloud_sim_* |
| VPCRouter | sakuracloud_vpc_router_* |
| Zone | sakuracloud_zone_* |
| Exporter | sakuracloud_exporter_* |
| Metric | Description | Labels |
|---|---|---|
| sakuracloud_auto_backup_info | A metric with a constant '1' value labeled by auto_backup information | id, name, disk_id, max_backup_num, weekdays, tags, descriptions |
| sakuracloud_auto_backup_count | A count of archives created by AutoBackup | id, name, disk_id |
| sakuracloud_auto_backup_last_time | Last backup time in seconds since epoch (1970) | id, name, disk_id |
| sakuracloud_auto_backup_archive_info | A metric with a constant '1' value labeled by backuped archive information | id, name, disk_id, archive_id, archive_name, archive_tags, archive_description |
| Metric | Description | Labels |
|---|---|---|
| sakuracloud_coupon_discount | The balance of coupon | id, member_id, contract_id |
| sakuracloud_coupon_remaining_days | The count of coupon's remaining days | id, member_id, contract_id |
| sakuracloud_coupon_exp_date | Coupon expiration date in seconds since epoch (1970) | id, member_id, contract_id |
| sakuracloud_coupon_usable | 1 if coupon is usable | id, member_id, contract_id |
| Metric | Description | Labels |
|---|---|---|
| sakuracloud_database_info | A metric with a constant '1' value labeled by database information | id, name, zone, plan, host, database_type, database_revision, database_version, web_ui, replication_enabled, replication_role, tags, description |
| sakuracloud_database_up | If 1 the database is up and running, 0 otherwise | id, name, zone |
| sakuracloud_database_cpu_time | Database's CPU time(unit:ms) | id, name, zone |
| sakuracloud_database_memory_used | Database's used memory size(unit:GB) | id, name, zone |
| sakuracloud_database_memory_total | Database's total memory size(unit:GB) | id, name, zone |
| sakuracloud_database_nic_info | A metric with a constant '1' value labeled by nic information | id, name, zone, upstream_type, upstream_id, upstream_name, ipaddress, nw_mask_len, gateway |
| sakuracloud_database_nic_receive | NIC's receive bytes(unit: Kbps) | id, name, zone |
| sakuracloud_database_nic_send | NIC's send bytes(unit: Kbps) | id, name, zone |
| sakuracloud_database_disk_system_used | Database's used system-disk size(unit:GB) | id, name, zone |
| sakuracloud_database_disk_system_total | Database's total system-disk size(unit:GB) | id, name, zone |
| sakuracloud_database_disk_backup_used | Database's used backup-disk size(unit:GB) | id, name, zone |
| sakuracloud_database_disk_backup_total | Database's total backup-disk size(unit:GB) | id, name, zone |
| sakuracloud_database_binlog_used | Database's used binlog size(unit:GB) | id, name, zone |
| sakuracloud_database_disk_read | Disk's read bytes(unit: KBps) | id, name, zone |
| sakuracloud_database_disk_write | Disk's write bytes(unit: KBps) | id, name, zone |
| sakuracloud_database_replication_delay | Replication delay time(unit:second) | id, name, zone |
| Metric | Description | Labels |
|---|---|---|
| sakuracloud_esme_info | A metric with a constant '1' value labeled by ESME information | id, name, tags, description |
| sakuracloud_esme_message_count | A count of messages handled by ESME | id, name, status |
| Metric | Description | Labels |
|---|---|---|
| sakuracloud_internet_info | A metric with a constant '1' value labeled by internet information | id, name, zone, switch_id, bandwidth, tags, description |
| sakuracloud_internet_receive | Total receive bytes(unit: Kbps) | id, name, zone, switch_id |
| sakuracloud_internet_send | Total send bytes(unit: Kbps) | id, name, zone, switch_id |
| Metric | Description | Labels |
|---|---|---|
| sakuracloud_loadbalancer_info | A metric with a constant '1' value labeled by loadbalancer information | id, name, zone, plan, ha, vrid, ipaddress1, ipaddress2, gateway, nw_mask_len, tags, description |
| sakuracloud_loadbalancer_up | If 1 the loadbalancer is up and running, 0 otherwise | id, name, zone |
| sakuracloud_loadbalancer_receive | Loadbalancer's receive bytes(unit: Kbps) | id, name, zone |
| sakuracloud_loadbalancer_send | Loadbalancer's receive bytes(unit: Kbps) | id, name, zone |
| sakuracloud_loadbalancer_vip_info | A metric with a constant '1' value labeld by vip information | id, name, zone, vip_index, vip, port, interval, sorry_server, description |
| sakuracloud_loadbalancer_vip_cps | Connection count per second | id, name, zone, vip_index, vip |
| sakuracloud_loadbalancer_server_info | A metric with a constant '1' value labeld by real-server information | id, name, zone, vip_index, vip, server_index, ipaddress ,monitor, path, response_code |
| sakuracloud_loadbalancer_server_up | If 1 the server is up and running, 0 otherwise | id, name, zone, vip_index, vip, server_index, ipaddress |
| sakuracloud_loadbalancer_server_connection | Current connection count | id, name, zone, vip_index, vip, server_index, ipaddress |
| sakuracloud_loadbalancer_server_cps | Connection count per second | id, name, zone, vip_index, vip, server_index, ipaddress |
| Metric | Description | Labels |
|---|---|---|
| sakuracloud_local_router_info | A metric with a constant '1' value labeled by localRouter information | id, name, tags, description |
| sakuracloud_local_router_up | If 1 the localRouter is up and running, 0 otherwise | id, name |
| sakuracloud_local_router_switch_info | A metric with a constant '1' value labeled by localRouter connected switch information | id, name, category, code, zone_id |
| sakuracloud_local_router_network_info | A metric with a constant '1' value labeled by network information of the localRouter | id, name, vip, ipaddress1, ipaddress2, nw_mask_len, vrid |
| sakuracloud_local_router_static_route_info | A metric with a constant '1' value labeled by static route information | id, name, route_index, prefix, next_hop |
| sakuracloud_local_router_peer_info | A metric with a constant '1' value labeled by peer information | id, name, peer_index, peer_id, enabled, description |
| sakuracloud_local_router_peer_up | If 1 the Peer is available, 0 otherwise | id, name, peer_index, peer_id |
| sakuracloud_local_router_receive_per_sec | Receive bytes per seconds | id, name |
| sakuracloud_local_router_send_per_sec | Send bytes per seconds | id, name |
| Metric | Description | Labels |
|---|---|---|
| sakuracloud_mobile_gateway_info | A metric with a constant '1' value labeled by mobile_gateway information | id, name, zone, internet_connection, inter_device_communication, tags, description |
| sakuracloud_mobile_gateway_up | If 1 the mobile_gateway is up and running, 0 otherwise | id, name, zone |
| sakuracloud_mobile_gateway_nic_receive | MobileGateway's receive bytes(unit: Kbps) | id, name, zone, nic_index, ipaddress, nw_mask_len |
| sakuracloud_mobile_gateway_nic_send | MobileGateway's send bytes(unit: Kbps) | id, name, zone, nic_index, ipaddress, nw_mask_len |
| sakuracloud_mobile_gateway_traffic_control_info | A metric with a constant '1' value labeled by traffic-control information | id, name, zone , traffic_quota_in_mb, bandwidth_limit_in_kbps, enable_email, enable_slack, slack_url, auto_traffic_shaping |
| sakuracloud_mobile_gateway_traffic_uplink | MobileGateway's uplink bytes(unit: KB) | id, name, zone |
| sakuracloud_mobile_gateway_traffic_downlink | MobileGateway's downlink bytes(unit: KB) | id, name, zone |
| sakuracloud_mobile_gateway_traffic_shaping | If 1 the traffic is shaped, 0 otherwise | id, name, zone |
| Metric | Description | Labels |
|---|---|---|
| sakuracloud_nfs_info | A metric with a constant '1' value labeled by nfs information | id, name, zone, plan, size, host, tags, description |
| sakuracloud_nfs_up | If 1 the nfs is up and running, 0 otherwise | id, name, zone |
| sakuracloud_nfs_free_disk_size | NFS's Free Disk Size(unit: GB) | id, name, zone |
| sakuracloud_nfs_nic_info | A metric with a constant '1' value labeled by nic information | id, name, zone, upstream_id, upstream_name, ipaddress, nw_mask_len, gateway |
| sakuracloud_nfs_receive | NIC's receive bytes(unit: Kbps) | id, name, zone |
| sakuracloud_nfs_send | NIC's send bytes(unit: Kbps) | id, name, zone |
| Metric | Description | Labels |
|---|---|---|
| sakuracloud_server_info | A metric with a constant '1' value labeled by server information | id, name, zone, cpus, disks, nics, memories, host, tags, description |
| sakuracloud_server_up | If 1 the server is up and running, 0 otherwise | id, name, zone |
Content type
Image
Digest
Size
8.2 MB
Last updated
over 5 years ago
docker pull sacloud/sakuracloud_exporter