<commit_before># file: roles/monitoring/tasks/main.yml

- name: Install netdata
  shell: curl -Ss 'https://raw.githubusercontent.com/firehol/netdata-demo-site/master/install-required-packages.sh' >/tmp/kickstart.sh && bash /tmp/kickstart.sh netdata-all<commit_msg>Take a stab at netdata<commit_after># file: roles/monitoring/tasks/main.yml

- name: Install netdata dependencies
  become: true
  apt: name={{item}} state=present
  with_items:
    - zlib1g-dev
    - uuid-dev
    - libmnl-dev
    - gcc
    - make
    - git
    - autoconf
    - autoconf-archive
    - autogen
    - automake
    - pkg-config
    - curl

- name: Install netdata extras
  become: true
  apt: name={{item}} state=present
  with_items:
    - jq
    - nodejs

- name: Clone netdata repo
  become: true
  shell: cd /opt && git clone https://github.com/firehol/netdata.git --depth=1

- name: Install netdata
  become: true
  shell: cd /opt/netdata && ./netdata-installer.sh

- name: Kill any running netdata processes
  become: true
  shell: killall netdata

- name: Copy netdata startup script
  become: true
  shell: cp /opt/netdata/system/netdata.service /etc/systemd/system/

- name: Make systemd aware of netdata
  become: true
  shell: systemctl daemon-reload

- name: Enable netdata service at startup
  become: true
  shell: systemctl enable netdata

- name: Start netdata service
  become: true
  shell: service netdata start
{'fraction_non_alphanumeric': 0.10511363636363637, 'fraction_numerical': 0.0014204545454545455, 'mean_word_length': 3.037249283667622, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6415343', 'n_tokens_mistral': 477, 'n_tokens_neox': 480, 'n_words': 131}