Sign inSign up

sacloud/sakuracloud_exporter

By sacloud

Updated over 5 years ago

Prometheus exporter for SakuraCloud metrics.

Image
1

1.9K

sacloud/sakuracloud_exporter repository overview

sakuracloud_exporter

Build Status Slack

Prometheus exporter for SakuraCloud metrics.

Installation

Binaries

Download the already existing binaries for your platform:

$ ./sakuracloud_exporter <flags> 

If you want to use sakuracloud_exporter with systemd, see systemd examples.

From source

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>
Docker

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 

Usage

Flags
Flag / Environment VariableRequiredDefaultDescription
--token / SAKURACLOUD_ACCESS_TOKENAPI Key(Token)
--secret / SAKURACLOUD_ACCESS_TOKEN_SECRETAPI Key(Secret)
--ratelimit/ SAKURACLOUD_RATE_LIMIT5API request rate limit(maximum:10)
--webaddr / WEB_ADDR:9542Exporter's listen address
--webpath/ WEB_PATH/metricsMetrics request path
--no-collector.auto-backupfalseDisable the AutoBackup collector
--no-collector.couponfalseDisable the Coupon collector
--no-collector.databasefalseDisable the Database collector
--no-collector.esmefalseDisable the ESME collector
--no-collector.internetfalseDisable the Internet(Switch+Router) collector
--no-collector.load-balancerfalseDisable the LoadBalancer collector
--no-collector.local-routerfalseDisable the LocalRouter collector
--no-collector.mobile-gatewayfalseDisable the MobileGateway collector
--no-collector.nfsfalseDisable the NFS collector
--no-collector.proxy-lbfalseDisable the ProxyLB(Enhanced LoadBalancer) collector
--no-collector.serverfalseDisable the Server collector
--no-collector.simfalseDisable the SIM collector
--no-collector.vpc-routerfalseDisable the VPCRouter collector
--no-collector.zonefalseDisable the Zone collector
Flags for debug
Flag / Environment VariableRequiredDefaultDescription
--fake-mode / FAKE_MODEThe 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].

Metrics
Supported Resource Types

The exporter returns the following metrics:

Resource TypeMetric Name Prefix
AutoBackupsakuracloud_auto_backup_*
Couponsakuracloud_coupon_*
Databasesakuracloud_database_*
ESMEsakuracloud_esme_*
Switch+Routersakuracloud_internet_*
LoadBalancersakuracloud_loadbalancer_*
LocalRoutersakuracloud_local_router_*
MobileGatewaysakuracloud_mobile_gateway_*
NFSsakuracloud_nfs_*
ProxyLBsakuracloud_proxylb_*
Serversakuracloud_server_*
SIMsakuracloud_sim_*
VPCRoutersakuracloud_vpc_router_*
Zonesakuracloud_zone_*
Exportersakuracloud_exporter_*
AutoBackup
MetricDescriptionLabels
sakuracloud_auto_backup_infoA metric with a constant '1' value labeled by auto_backup informationid, name, disk_id, max_backup_num, weekdays, tags, descriptions
sakuracloud_auto_backup_countA count of archives created by AutoBackupid, name, disk_id
sakuracloud_auto_backup_last_timeLast backup time in seconds since epoch (1970)id, name, disk_id
sakuracloud_auto_backup_archive_infoA metric with a constant '1' value labeled by backuped archive informationid, name, disk_id, archive_id, archive_name, archive_tags, archive_description
Coupon
MetricDescriptionLabels
sakuracloud_coupon_discountThe balance of couponid, member_id, contract_id
sakuracloud_coupon_remaining_daysThe count of coupon's remaining daysid, member_id, contract_id
sakuracloud_coupon_exp_dateCoupon expiration date in seconds since epoch (1970)id, member_id, contract_id
sakuracloud_coupon_usable1 if coupon is usableid, member_id, contract_id
Database
MetricDescriptionLabels
sakuracloud_database_infoA metric with a constant '1' value labeled by database informationid, name, zone, plan, host, database_type, database_revision, database_version, web_ui, replication_enabled, replication_role, tags, description
sakuracloud_database_upIf 1 the database is up and running, 0 otherwiseid, name, zone
sakuracloud_database_cpu_timeDatabase's CPU time(unit:ms)id, name, zone
sakuracloud_database_memory_usedDatabase's used memory size(unit:GB)id, name, zone
sakuracloud_database_memory_totalDatabase's total memory size(unit:GB)id, name, zone
sakuracloud_database_nic_infoA metric with a constant '1' value labeled by nic informationid, name, zone, upstream_type, upstream_id, upstream_name, ipaddress, nw_mask_len, gateway
sakuracloud_database_nic_receiveNIC's receive bytes(unit: Kbps)id, name, zone
sakuracloud_database_nic_sendNIC's send bytes(unit: Kbps)id, name, zone
sakuracloud_database_disk_system_usedDatabase's used system-disk size(unit:GB)id, name, zone
sakuracloud_database_disk_system_totalDatabase's total system-disk size(unit:GB)id, name, zone
sakuracloud_database_disk_backup_usedDatabase's used backup-disk size(unit:GB)id, name, zone
sakuracloud_database_disk_backup_totalDatabase's total backup-disk size(unit:GB)id, name, zone
sakuracloud_database_binlog_usedDatabase's used binlog size(unit:GB)id, name, zone
sakuracloud_database_disk_readDisk's read bytes(unit: KBps)id, name, zone
sakuracloud_database_disk_writeDisk's write bytes(unit: KBps)id, name, zone
sakuracloud_database_replication_delayReplication delay time(unit:second)id, name, zone
ESME
MetricDescriptionLabels
sakuracloud_esme_infoA metric with a constant '1' value labeled by ESME informationid, name, tags, description
sakuracloud_esme_message_countA count of messages handled by ESMEid, name, status
Switch+Router
MetricDescriptionLabels
sakuracloud_internet_infoA metric with a constant '1' value labeled by internet informationid, name, zone, switch_id, bandwidth, tags, description
sakuracloud_internet_receiveTotal receive bytes(unit: Kbps)id, name, zone, switch_id
sakuracloud_internet_sendTotal send bytes(unit: Kbps)id, name, zone, switch_id
LoadBalancer
MetricDescriptionLabels
sakuracloud_loadbalancer_infoA metric with a constant '1' value labeled by loadbalancer informationid, name, zone, plan, ha, vrid, ipaddress1, ipaddress2, gateway, nw_mask_len, tags, description
sakuracloud_loadbalancer_upIf 1 the loadbalancer is up and running, 0 otherwiseid, name, zone
sakuracloud_loadbalancer_receiveLoadbalancer's receive bytes(unit: Kbps)id, name, zone
sakuracloud_loadbalancer_sendLoadbalancer's receive bytes(unit: Kbps)id, name, zone
sakuracloud_loadbalancer_vip_infoA metric with a constant '1' value labeld by vip informationid, name, zone, vip_index, vip, port, interval, sorry_server, description
sakuracloud_loadbalancer_vip_cpsConnection count per secondid, name, zone, vip_index, vip
sakuracloud_loadbalancer_server_infoA metric with a constant '1' value labeld by real-server informationid, name, zone, vip_index, vip, server_index, ipaddress ,monitor, path, response_code
sakuracloud_loadbalancer_server_upIf 1 the server is up and running, 0 otherwiseid, name, zone, vip_index, vip, server_index, ipaddress
sakuracloud_loadbalancer_server_connectionCurrent connection countid, name, zone, vip_index, vip, server_index, ipaddress
sakuracloud_loadbalancer_server_cpsConnection count per secondid, name, zone, vip_index, vip, server_index, ipaddress
LocalRouter
MetricDescriptionLabels
sakuracloud_local_router_infoA metric with a constant '1' value labeled by localRouter informationid, name, tags, description
sakuracloud_local_router_upIf 1 the localRouter is up and running, 0 otherwiseid, name
sakuracloud_local_router_switch_infoA metric with a constant '1' value labeled by localRouter connected switch informationid, name, category, code, zone_id
sakuracloud_local_router_network_infoA metric with a constant '1' value labeled by network information of the localRouterid, name, vip, ipaddress1, ipaddress2, nw_mask_len, vrid
sakuracloud_local_router_static_route_infoA metric with a constant '1' value labeled by static route informationid, name, route_index, prefix, next_hop
sakuracloud_local_router_peer_infoA metric with a constant '1' value labeled by peer informationid, name, peer_index, peer_id, enabled, description
sakuracloud_local_router_peer_upIf 1 the Peer is available, 0 otherwiseid, name, peer_index, peer_id
sakuracloud_local_router_receive_per_secReceive bytes per secondsid, name
sakuracloud_local_router_send_per_secSend bytes per secondsid, name
MobileGateway
MetricDescriptionLabels
sakuracloud_mobile_gateway_infoA metric with a constant '1' value labeled by mobile_gateway informationid, name, zone, internet_connection, inter_device_communication, tags, description
sakuracloud_mobile_gateway_upIf 1 the mobile_gateway is up and running, 0 otherwiseid, name, zone
sakuracloud_mobile_gateway_nic_receiveMobileGateway's receive bytes(unit: Kbps)id, name, zone, nic_index, ipaddress, nw_mask_len
sakuracloud_mobile_gateway_nic_sendMobileGateway's send bytes(unit: Kbps)id, name, zone, nic_index, ipaddress, nw_mask_len
sakuracloud_mobile_gateway_traffic_control_infoA metric with a constant '1' value labeled by traffic-control informationid, name, zone , traffic_quota_in_mb, bandwidth_limit_in_kbps, enable_email, enable_slack, slack_url, auto_traffic_shaping
sakuracloud_mobile_gateway_traffic_uplinkMobileGateway's uplink bytes(unit: KB)id, name, zone
sakuracloud_mobile_gateway_traffic_downlinkMobileGateway's downlink bytes(unit: KB)id, name, zone
sakuracloud_mobile_gateway_traffic_shapingIf 1 the traffic is shaped, 0 otherwiseid, name, zone
NFS
MetricDescriptionLabels
sakuracloud_nfs_infoA metric with a constant '1' value labeled by nfs informationid, name, zone, plan, size, host, tags, description
sakuracloud_nfs_upIf 1 the nfs is up and running, 0 otherwiseid, name, zone
sakuracloud_nfs_free_disk_sizeNFS's Free Disk Size(unit: GB)id, name, zone
sakuracloud_nfs_nic_infoA metric with a constant '1' value labeled by nic informationid, name, zone, upstream_id, upstream_name, ipaddress, nw_mask_len, gateway
sakuracloud_nfs_receiveNIC's receive bytes(unit: Kbps)id, name, zone
sakuracloud_nfs_sendNIC's send bytes(unit: Kbps)id, name, zone
Server
MetricDescriptionLabels
sakuracloud_server_infoA metric with a constant '1' value labeled by server informationid, name, zone, cpus, disks, nics, memories, host, tags, description
sakuracloud_server_upIf 1 the server is up and running, 0 otherwiseid, name, zone

Tag summary

Content type

Image

Digest

Size

8.2 MB

Last updated

over 5 years ago

docker pull sacloud/sakuracloud_exporter