Added default queries&new parameter for Gainsight
- Be able to use default queries with Gainsight.
- By default enable the script.
Change-Id: I9ccd53ad5aa4b83d59e39668e1d1c64fc3ebf398
Related-Bug: PROD-21049
diff --git a/docker/swarm/stack/monitoring/gainsight.yml b/docker/swarm/stack/monitoring/gainsight.yml
index 0cdb4b8..11344b7 100644
--- a/docker/swarm/stack/monitoring/gainsight.yml
+++ b/docker/swarm/stack/monitoring/gainsight.yml
@@ -2,6 +2,7 @@
- system.prometheus.gainsight.container
parameters:
_param:
+ gainsight_enabled: 'true'
gainsight_csv_upload_url: 'http://localhost:9999'
gainsight_account_id: 'default'
gainsight_environment_id: 'default'
@@ -49,3 +50,4 @@
LOGIN: "${_param:gainsight_login}"
PROMETHEUS_URL: "${_param:gainsight_prometheus_url}"
CONFIG_PATH: "${_param:gainsight_config_path}"
+ ENABLED: "${_param:gainsight_enabled}"
diff --git a/prometheus/gainsight/query/openstack.yml b/prometheus/gainsight/query/openstack.yml
new file mode 100644
index 0000000..9215d2e
--- /dev/null
+++ b/prometheus/gainsight/query/openstack.yml
@@ -0,0 +1,19 @@
+parameters:
+ prometheus:
+ gainsight:
+ queries:
+ vcpu_used: "'vCPU Used','sum(avg_over_time(openstack_nova_used_vcpus[24h]))'"
+ vcpu_free: "'vCPU Free','sum(avg_over_time(openstack_nova_free_vcpus[24h]))'"
+ vstorge_used: "'vStorage Used','sum(avg_over_time(openstack_nova_used_disk[24h]))'"
+ vstorage_free: "'vStorage Free','sum(avg_over_time(openstack_nova_free_disk[24h]))'"
+ vram_used: "'vRAM Used','sum(avg_over_time(openstack_nova_used_ram[24h]))'"
+ vram_free: "'vRAM Free','sum(avg_over_time(openstack_nova_free_ram[24h]))'"
+ instances: "'Instances','sum(avg_over_time(openstack_nova_instances[24h]))'"
+ compute_nodes: "'Compute Nodes','sum(openstack_nova_services{service=~\"nova.compute\"})'"
+ tenants: "'Tenants','sum(avg_over_time(openstack_keystone_tenants_total[24h]))'"
+ cinder_api: "'Cinder API','avg(avg_over_time(openstack_api_check_status{service=\"cinderv2\"}[24h]))'"
+ nova_api: "'Nova API','avg(avg_over_time(openstack_api_check_status{service=\"nova\"}[24h]))'"
+ keystone_api: "'Keystone API','avg(avg_over_time(openstack_api_check_status{service=\"keystone\"}[24h]))'"
+ glance_api: "'Glance API','avg(avg_over_time(openstack_api_check_status{service=\"glance\"}[24h]))'"
+ keystone_api: "'Keystone API','avg(avg_over_time(openstack_api_check_status{service=\"keystone\"}[24h]))'"
+ neutron_api: "'Neutron API','avg(avg_over_time(openstack_api_check_status{service=\"neutron\"}[24h]))'"