<commit_before>{%- from 'nrpe/map.jinja' import nrpe with context -%}

{%- set hostname = grains['host'] -%}
{%- set user = pillar['nrpe']['mysql'][hostname]['user'] -%}

{%- if pillar['nrpe']['mysql'][hostname]['pass'] is defined -%}
  {%- set pass = pillar['nrpe']['mysql'][hostname]['pass'] -%}
{%- endif -%}
{%- if pillar['nrpe']['mysql'][hostname]['db'] is defined -%}
  {%- set db = pillar['nrpe']['mysql'][hostname]['db'] -%}
{%- endif -%}
# MySQL checks
command[check_mysql]=/usr/{{ libarch }}/nagios/plugins/check_mysql -u {{user}} {% if pillar['nrpe']['mysql'][hostname]['db'] is defined %}-d {{db}} {% endif %}{% if pillar['nrpe']['mysql'][hostname]['pass'] is defined %}-p {{pass}} {% endif %}
{%- if pillar['nrpe']['mysql'][hostname]['galera'] is defined %}

# Galera checks
command[check_galera_flow]=/usr/{{ libarch }}/nagios/plugins/pmp-check-mysql-status -l {{user}} {% if pillar['nrpe']['mysql'][hostname]['pass'] is defined %}-p {{pass}} {% endif %}-x wsrep_flow_control_paused -w 0.1 -c 0.9
command[check_galera_node]=/usr/{{ libarch }}/nagios/plugins/pmp-check-mysql-status -l {{user}} {% if pillar['nrpe']['mysql'][hostname]['pass'] is defined %}-p {{pass}} {% endif %}-x wsrep_local_state_comment -C '!=' -T str -w Synced
{%- endif -%}
<commit_msg>Update mysql.cfg<commit_after>{%- from 'nrpe/map.jinja' import nrpe with context -%}

{%- set hostname = grains['host'] -%}
{%- set user = pillar['nrpe']['mysql'][hostname]['user'] -%}

{%- if pillar['nrpe']['mysql'][hostname]['pass'] is defined -%}
  {%- set pass = pillar['nrpe']['mysql'][hostname]['pass'] -%}
{%- endif -%}
{%- if pillar['nrpe']['mysql'][hostname]['db'] is defined -%}
  {%- set db = pillar['nrpe']['mysql'][hostname]['db'] -%}
{%- endif -%}
# MySQL checks
command[check_mysql]=/usr/{{ libarch }}/nagios/plugins/check_mysql -u {{user}} {% if pillar['nrpe']['mysql'][hostname]['db'] is defined %}-d {{db}} {% endif %}{% if pillar['nrpe']['mysql'][hostname]['pass'] is defined %}-p {{pass}} {% endif %}
{%- if pillar['nrpe']['mysql'][hostname]['galera'] is defined %}

# Galera checks
command[check_galera_flow]=/usr/{{ libarch }}/nagios/plugins/pmp-check-mysql-status -l {{user}} {% if pillar['nrpe']['mysql'][hostname]['pass'] is defined %}-p {{pass}} {% endif %}-x wsrep_flow_control_paused -w 0.1 -c 0.9
command[check_galera_node]=/usr/{{ libarch }}/nagios/plugins/pmp-check-mysql-status -l {{user}} {% if pillar['nrpe']['mysql'][hostname]['pass'] is defined %}-p {{pass}} {% endif %}-x wsrep_local_state_comment -C '!=' -T str -w Synced
command[check_galera_size]=/usr/{{ libarch }}/nagios/plugins/pmp-check-mysql-status -l {{user}} {% if pillar['nrpe']['mysql'][hostname]['pass'] is defined %}-p {{pass}} {% endif %}-x wsrep_cluster_size -C '<=' -w $ARG1$ -c $ARG2$
{%- endif -%}

{'fraction_non_alphanumeric': 0.26954954954954957, 'fraction_numerical': 0.0036036036036036037, 'mean_word_length': 5.381609195402299, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '1849209', 'n_tokens_mistral': 1062, 'n_tokens_neox': 1010, 'n_words': 208}