巡检报告
生成时间:
{{ data.time }}
{{ data.summary.critical}}
Total
{{ data.summary.total}}
Bad评判条件: 80 <= 使用率 < 90, Critical评判条件: 使用率 >= 90
{% if data.summary.error != 0 %}
Error List
Host |
msg |
{% for key, value in data.error_item.items() %}
{{ key }} |
{{ value.msg }} |
{% endfor %}
{% endif %}
{% if data.summary.critical != 0 %}
Critical List
Hostname |
Main IP |
OS |
Mem Used |
Swap Used |
Disk Size Used |
Disk Inode Used |
Timestamp |
{% for key, value in data.critical_item.items() %}
{{ value.ansible_hostname }} |
{{ value.ansible_default_ipv4.address | default(key)}} |
{{ value.ansible_distribution }} {{ value.ansible_distribution_version }} |
{% if 'mem' in value.critical %}{% elif 'mem' in value.bad %}{%else%}{% endif %}{{ value.usedutilization.mem }}% |
{% if 'swap' in value.critical %}{% elif 'swap' in value.bad %}{%else%}{% endif %}{{ value.usedutilization.swap }}% |
{% for d in value.usedutilization.disk %}
{% if 'mount_size_' + d.mount in value.critical %}{% elif 'mount_size_' +d.mount in value.bad %}{%else%}{% endif %}
{{ d.mount }} [{{ d.size }}%]
{% if not loop.last %}{% endif %}
{% endfor%}
|
{% for d in value.usedutilization.disk %}
{% if 'mount_inode_' + d.mount in value.critical %}{% elif 'mount_inode_' + d.mount in value.bad %} {% else %}{% endif %}
{{ d.mount }} [{{ d.inode }}%]
{% if not loop.last %}{% endif %}
{% endfor%}
|
{% if 'time' in value.critical %}{% elif 'time' in value.bad %}{% else %}{% endif %}{{ value.usedutilization.os_time }} |
{% endfor %}
{% endif %}
{% if data.summary.bad != 0 %}
Bad List
Hostname |
Main IP |
OS |
Mem Used |
Swap Used |
Disk Size Used |
Disk Inode Used |
Timestamp |
{% for key, value in data.bad_item.items() %}
{{ value.ansible_hostname }} |
{{ value.ansible_default_ipv4.address | default(key) }} |
{{ value.ansible_distribution }} {{ value.ansible_distribution_version }} |
{% if 'mem' in value.bad %}{% else %}{% endif %}{{ value.usedutilization.mem }}% |
{% if 'swap' in value.bad %}{% else %}{% endif %}{{ value.usedutilization.swap }}% |
{% for d in value.usedutilization.disk %}
{% if 'mount_size_' + d.mount in value.bad %}{% else %} {% endif %}
{{ d.mount }} [{{ d.size }}%]
{% if not loop.last %}{% endif %}
{% endfor%}
|
{% for d in value.usedutilization.disk %}
{% if 'mount_inode_' + d.mount in value.bad %} {% else %} {% endif %} >
{{ d.mount }} [{{ d.inode }}%]
{% if not loop.last %}{% endif %}
{% endfor%}
|
{% if 'time' in value.bad %}{% else %}{% endif %}{{ value.usedutilization.os_time }} |
{% endfor %}
{% endif %}
{% if data.summary.ok != 0 %}
OK List
Hostname |
Main IP |
OS |
Mem Used |
Swap Used |
Disk Size Used |
Disk Inode Used |
Timestamp |
{% for key, value in data.ok_item.items() %}
{{ value.ansible_hostname }} |
{{ value.ansible_default_ipv4.address | default(key) }} |
{{ value.ansible_distribution }} {{ value.ansible_distribution_version }} |
{{ value.usedutilization.mem }}% |
{{ value.usedutilization.swap }}% |
{% for d in value.usedutilization.disk %}
{{ d.mount }} [{{ d.size }}%] {% if not loop.last %}{% endif %}
{% endfor%} |
{% for d in value.usedutilization.disk %}
{{ d.mount }} [{{ d.inode }}%] {% if not loop.last %}{% endif %}
{% endfor%} |
{{ value.usedutilization.os_time }} |
{% endfor %}
{% endif %}