Browse Source

Issue #754: Updated grafana datasource url

Signed-off-by: blesson-james <blesson_james@Dellteam.com>
blesson-james 3 years ago
parent
commit
873e86b6f1
1 changed files with 4 additions and 1 deletions
  1. 4 1
      roles/slurm_exporter/tasks/configure_grafana.yml

+ 4 - 1
roles/slurm_exporter/tasks/configure_grafana.yml

@@ -13,6 +13,9 @@
 #  limitations under the License.
 ---
 
+- name: Include k8s_start_services variables
+  include_vars: ../../k8s_start_services/vars/main.yml
+
 - name: Create prometheus datasource in grafana
   community.grafana.grafana_datasource:
     name: "hpc-prometheus-{{ ansible_default_ipv4.address }}"
@@ -20,7 +23,7 @@
     grafana_user: "{{ hostvars['127.0.0.1']['grafana_username'] }}"
     grafana_password: "{{ hostvars['127.0.0.1']['grafana_password'] }}"
     ds_type: prometheus
-    ds_url: "http://{{ ansible_default_ipv4.address }}"
+    ds_url: "http://{{ ansible_default_ipv4.address }}:{{ nginx_listen_port }}"
     access: direct
   delegate_to: localhost
   no_log: true