Skip to content

Commit

Permalink
fix3
Browse files Browse the repository at this point in the history
  • Loading branch information
ishanjainn committed Aug 10, 2023
1 parent c447ee1 commit c205229
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 57 deletions.
58 changes: 1 addition & 57 deletions .github/workflows/grafana-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,61 +27,5 @@ jobs:
- name: Install ansible-base (stable-2.14)
run: pip install https://github.com/ansible/ansible/archive/stable-2.14.tar.gz --disable-pip-version-check

- name: Create Ansible playbook
run: |
cat <<EOF > grafana-agent-linux-test.yml
- name: Install Grafana Agent
hosts: localhost
become: true

tasks:
- name: Install Grafana Agent
ansible.builtin.include_role:
name: grafana.grafana.grafana_agent
vars:
grafana_agent_metrics_config:
configs:
- name: integrations
remote_write:
- basic_auth:
password: '{{ grafana_cloud_api_key }}'
username: '{{ metrics_username }}'
url: '{{ prometheus_url }}'

global:
scrape_interval: 60s
wal_directory: /tmp/grafana-agent-wal
grafana_agent_logs_config:
configs:
- name: default
clients:
- basic_auth:
password: '{{ grafana_cloud_api_key }}'
username: '{{ logs_username }}'
url: '{{ loki_url }}'
positions:
filename: /tmp/positions.yaml
target_config:
sync_period: 10s
scrape_configs:
- job_name: varlogs
static_configs:
- targets: [localhost]
labels:
instance: ${HOSTNAME:-default}
job: varlogs
__path__: /var/log/*log
grafana_agent_integrations_config:
node_exporter:
enabled: true
instance: ${HOSTNAME:-default}
prometheus_remote_write:
- basic_auth:
password: '{{ grafana_cloud_api_key }}'
username: '{{ metrics_username }}'
url: '{{ prometheus_url }}'
grafana_agent_env_vars:
HOSTNAME: '%H'
EOF
- name: Run Grafana Agent Role test
run: ansible-playbook tests/integration/targets/grafana_agent/linux.yml
run: ansible-playbook tests/integration/grafana_agent/linux.yml --extra-vars "grafana_cloud_api_key=${{ secrets.ANSIBLE_TEST_CLOUD_API_KEY }} metrics_username=${{ secrets.METRICS_USERNAME }} logs_username=${{ secrets.LOGS_USERNAME }} loki_url=${{ secrets.LOGS_PUSH_URL }} prometheus_url=${{ secrets.METRICS_PUSH_URL }}

Check warning on line 31 in .github/workflows/grafana-agent.yml

View workflow job for this annotation

GitHub Actions / Perform Linting

31:151 [line-length] line too long (326 > 150 characters)

Check failure on line 31 in .github/workflows/grafana-agent.yml

View workflow job for this annotation

GitHub Actions / Perform Linting

31:327 [new-line-at-end-of-file] no new line character at the end of file
File renamed without changes.

0 comments on commit c205229

Please sign in to comment.