-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
918 additions
and
680 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
name: Alloy Molecule | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
defaults: | ||
run: | ||
working-directory: roles/alloy | ||
|
||
jobs: | ||
molecule: | ||
name: Molecule | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
distro: | ||
- rockylinux9 | ||
- ubuntu2204 | ||
- debian12 | ||
|
||
steps: | ||
- name: Check out the codebase. | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3. | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install test dependencies. | ||
run: pip3 install ansible molecule molecule-plugins[docker] docker | ||
|
||
- name: Run Molecule tests. | ||
run: molecule test | ||
env: | ||
PY_COLORS: '1' | ||
ANSIBLE_FORCE_COLOR: '1' | ||
MOLECULE_DISTRO: ${{ matrix.distro }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
- name: Install alloy | ||
--- | ||
- name: Deploy alloy | ||
hosts: all | ||
become: true | ||
|
||
roles: | ||
- role: grafana.grafana.alloy | ||
tasks: | ||
- name: Install alloy | ||
- name: Deploy alloy | ||
ansible.builtin.include_role: | ||
name: grafana.grafana.alloy | ||
vars: | ||
config: | | ||
alloy_config: | | ||
prometheus.scrape "default" { | ||
targets = [{"__address__" = "localhost:12345"}] | ||
forward_to = [prometheus.remote_write.prom.receiver] | ||
targets = [{"__address__" = "127.0.0.1:12345"}] | ||
forward_to = [prometheus.remote_write.prom.receiver] | ||
} | ||
prometheus.remote_write "prom" { | ||
endpoint { | ||
url = "https://prometheus-prod-13-prod-us-east-0.grafana.net/api/prom/push" | ||
basic_auth { | ||
username = "1493467" | ||
password = "glc_eyJvIjoiNjUyOTkyIiwibiI6InN0YWNrLTg5MDA0My1obS13cml0ZS1hc2FzIiwiayI6IjIwME9NeThmWlFpMGlmQzBGMTlJNDdqSiIsIm0iOnsiciI6InByb2QtdXMtZWFzdC0wIn19" | ||
} | ||
url = "http://mimir:9009/api/v1/push" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,32 @@ | ||
version: "1.0.0" | ||
--- | ||
# defaults file for alloy | ||
alloy_version: "latest" | ||
alloy_uninstall: false | ||
alloy_expose_port: false | ||
alloy_download_url_rpm: "https://github.com/grafana/alloy/releases/download/v{{ alloy_version }}/alloy-{{ alloy_version }}-1.{{ __alloy_arch }}.rpm" | ||
alloy_download_url_deb: "https://github.com/grafana/alloy/releases/download/v{{ alloy_version }}/alloy-{{ alloy_version }}-1.{{ __alloy_arch }}.deb" | ||
|
||
arch_mapping: | ||
x86_64: amd64 | ||
aarch64: arm64 | ||
armv7l: armhf | ||
i386: i386 | ||
ppc64le: ppc64le | ||
|
||
arch: "{{ arch_mapping[ansible_architecture] | default('amd64') }}" | ||
|
||
binary_url: "https://github.com/grafana/alloy/releases/download/v{{ version }}/alloy-linux-{{ arch }}.zip" | ||
|
||
service_name: "alloy" | ||
|
||
installation_dir: "/usr/local/bin" | ||
|
||
environment_file: "service.env" | ||
|
||
config_dir: "/etc/alloy" | ||
|
||
config_file: "config.alloy" | ||
|
||
service_user: "alloy" | ||
|
||
service_group: "alloy" | ||
|
||
working_dir: "/var/lib/alloy" | ||
|
||
env_file_vars: {} | ||
|
||
alloy_flags_extra: {} | ||
|
||
start_after_service: '' | ||
|
||
config: | | ||
prometheus.scrape "default" { | ||
targets = [{"__address__" = "localhost:12345"}] | ||
forward_to = [prometheus.remote_write.prom.receiver] | ||
} | ||
prometheus.remote_write "prom" { | ||
endpoint { | ||
url = "http://mimir:9009/api/v1/push" | ||
} | ||
} | ||
# Configurable user groups that the Grafana Alloy can be put in so that it can access logs. | ||
alloy_user_groups: [] | ||
# alloy_user_groups: | ||
# - "systemd-journal" | ||
|
||
alloy_env_file_vars: {} | ||
# alloy_env_file_vars: | ||
# CUSTOM_ARGS: "--server.http.listen-addr=0.0.0.0:12345 --stability.level=public-preview --feature.community-components.enabled=true" | ||
|
||
alloy_systemd_override: {} | ||
# alloy_systemd_override: | | ||
# [Service] | ||
# User=root | ||
|
||
alloy_config: {} | ||
# alloy_config: | | ||
# prometheus.scrape "default" { | ||
# targets = [{"__address__" = "127.0.0.1:12345"}] | ||
# forward_to = [prometheus.remote_write.prom.receiver] | ||
# } | ||
# prometheus.remote_write "prom" { | ||
# endpoint { | ||
# url = "http://mimir:9009/api/v1/push" | ||
# } | ||
# } |
Oops, something went wrong.