From a5106c8f47b11487ce96d2a84da93491346461f5 Mon Sep 17 00:00:00 2001 From: VURU Date: Thu, 11 May 2023 22:25:56 +0200 Subject: [PATCH] update grafana to v 9.5.2 Set fs.inotify.max_user_instances to 4096 by default --- ansible/setup/common/tasks/host_config.yml | 14 ++++++++++++++ ansible/setup/common/tasks/main.yml | 6 ++++-- ansible/setup/common/tasks/set_timezone_utc.yml | 8 -------- ansible/setup/stack_observability/tasks/main.yml | 2 +- docs/205_stack_core_mimir_prometheus.adoc | 4 ++++ docs/902_cheet_sheet_ubuntu.adoc | 11 +++++++++++ 6 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 ansible/setup/common/tasks/host_config.yml delete mode 100644 ansible/setup/common/tasks/set_timezone_utc.yml create mode 100644 docs/205_stack_core_mimir_prometheus.adoc diff --git a/ansible/setup/common/tasks/host_config.yml b/ansible/setup/common/tasks/host_config.yml new file mode 100644 index 0000000..106a7e9 --- /dev/null +++ b/ansible/setup/common/tasks/host_config.yml @@ -0,0 +1,14 @@ +- name: Set timezone to UTC + become: true + community.general.timezone: + name: UTC + register: ts + +- name: Set Inode settings + become: true + changed_when: false + shell: | + if [ $(sysctl fs.inotify.max_user_instances | awk '{print $3}') -lt 4096 ]; then sysctl -w fs.inotify.max_user_instances=4096 ;fi + +- debug: + msg: "{{ ts }}" \ No newline at end of file diff --git a/ansible/setup/common/tasks/main.yml b/ansible/setup/common/tasks/main.yml index 2002469..3981b6d 100644 --- a/ansible/setup/common/tasks/main.yml +++ b/ansible/setup/common/tasks/main.yml @@ -18,8 +18,8 @@ import_tasks: install_base_packages.yml - - name: "Set Timezone {{host_name}}" - import_tasks: set_timezone_utc.yml + - name: "Host config {{host_name}}" + import_tasks: host_config.yml @@ -36,5 +36,7 @@ - name: "copy check config sh to the nodes " import_tasks: copy_check_config.yml + + tags: - nodes diff --git a/ansible/setup/common/tasks/set_timezone_utc.yml b/ansible/setup/common/tasks/set_timezone_utc.yml deleted file mode 100644 index 4e623c2..0000000 --- a/ansible/setup/common/tasks/set_timezone_utc.yml +++ /dev/null @@ -1,8 +0,0 @@ -- name: Set timezone to UTC - become: true - community.general.timezone: - name: UTC - register: ts - -- debug: - msg: "{{ ts }}" \ No newline at end of file diff --git a/ansible/setup/stack_observability/tasks/main.yml b/ansible/setup/stack_observability/tasks/main.yml index 45a10cb..c2e850f 100644 --- a/ansible/setup/stack_observability/tasks/main.yml +++ b/ansible/setup/stack_observability/tasks/main.yml @@ -24,7 +24,7 @@ - docker_build_dir: "/tmp/dockerbuild" - nomad_cli_cert: "{{base_cert_dir}}/nomad/nomad-cli.pem" - nomad_cli_cert_key: "{{base_cert_dir}}/nomad/nomad-cli-key.pem" - - version_grafana: "9.5.1" + - version_grafana: "9.5.2" - version_grafana_nomadder: "{{version_grafana}}.0" - version_grafana_mimir: "2.8.0" - version_grafana_loki: "2.8.2" diff --git a/docs/205_stack_core_mimir_prometheus.adoc b/docs/205_stack_core_mimir_prometheus.adoc new file mode 100644 index 0000000..9c4542d --- /dev/null +++ b/docs/205_stack_core_mimir_prometheus.adoc @@ -0,0 +1,4 @@ +=== PromQl Basics + +==== staleness +https://www.youtube.com/watch?v=GcTzd2CLH7I&ab_channel=PrometheusMonitoring diff --git a/docs/902_cheet_sheet_ubuntu.adoc b/docs/902_cheet_sheet_ubuntu.adoc index f57961a..a50951b 100644 --- a/docs/902_cheet_sheet_ubuntu.adoc +++ b/docs/902_cheet_sheet_ubuntu.adoc @@ -45,6 +45,17 @@ a|[source,shell] sudo nmap -sT -p- 172.26.73.37 ---- +|Increase the inotify limits +a|[source,shell] +---- +# In case of node logs Error streaming logs: error getting journald fd: Too many open files +#Find current values +sysctl fs.inotify +#Set new value with + +sudo sysctl -w fs.inotify.max_user_instances=2048 +---- +[[_205_link_inode,Manage Inode]]https://maestral.app/docs/inotify-limits[Manage Inode]