5.2.3.2.3. Redis checks
In this section we can find automated checks that allow us to know the state of the Redis of an environment and to be able to identify the errors related to them.
These automated checks can be find in the all_checks.yml
file of the following path:
cd /usr/share/opennac/ansible/
The following points detail the different checks that ansible performs in an automated way as well as the tags available when executing them.
5.2.3.2.3.1. Checks
Ensure that all the nodes that need to access redis in principal and aggregator do it
5.2.3.2.3.3. Data Structure
"redis": {
"{{ node_id }}": {
"error": {
"{{ node_id }}": "{{ node_ip }}"
},
"hostname": "{{ node_hostname }}",
"ip": "{{ node_ip }}",
"ok": {
"{{ node_id }}": "{{ node_ip }}"
}
}
}
The data structure shown is explained below:
node_id: corresponds to the hostname of the node and contains REDIS service information of the node.
hostname: node hostname.
ip: node IP address.
ok: redis node hostname and IP with OK status.
error: redis node hostname and IP with ERROR status.
5.2.3.2.3.4. Example
Command:
ansible-playbook -i inventory all_checks.yml --tags "redis"
Output:
"redis": {
"02-aggregator-07": {
"error": {},
"hostname": "02-aggregator-07",
"ip": "10.10.39.107",
"ok": {
"02-aggregator-07": "10.10.39.107"
}
}
}