Merge "netconsole remote kernel logger"
diff --git a/README.rst b/README.rst
index 6f1c5b6..856851b 100644
--- a/README.rst
+++ b/README.rst
@@ -1,6 +1,6 @@
-=====
-Linux
-=====
+============
+Linux Fomula
+============
Linux Operating Systems.
@@ -10,10 +10,11 @@
* Fedora
* Arch
-Sample pillars
+Sample Pillars
==============
-Linux system
+
+Linux System
------------
Basic Linux box
@@ -57,6 +58,7 @@
This ways ``linux.system.sudo`` pillar map to actual sudo attributes:
.. code-block:: jinja
+
# simplified template:
Cmds_Alias {{ alias }}={{ commands }}
{{ user }} {{ hosts }}=({{ runas }}) NOPASSWD: {{ commands }}
@@ -65,8 +67,8 @@
# when rendered:
saltuser1 ALL=(ALL) NOPASSWD: ALL
-
.. code-block:: yaml
+
linux:
system:
sudo:
diff --git a/linux/meta/prometheus.yml b/linux/meta/prometheus.yml
new file mode 100644
index 0000000..83e8eac
--- /dev/null
+++ b/linux/meta/prometheus.yml
@@ -0,0 +1,44 @@
+{% raw %}
+server:
+ alert:
+ AvgCPUUsageIdle:
+ if: 'avg_over_time(cpu_usage_idle{cpu="cpu-total"}[5m]) < 10'
+ labels:
+ severity: warning
+ service: system
+ annotations:
+ summary: 'Avarage CPU usage (idle) for node {{ $labels.host }} is low'
+ description: 'Avarage CPU usage (idle) for node {{ $labels.host }} is low {{ $value }}'
+ PredictLinearDiskFree:
+ if: 'predict_linear(disk_free[1h], 8*3600) < 0'
+ labels:
+ severity: warning
+ service: system
+ annotations:
+ summary: 'Disk space ({{ $labels.path }}) is filling on {{ $labels.host }}'
+ description: 'Disk space ({{ $labels.path }}) will be full in 8h on {{ $labels.host }}'
+ PredictLinearDiskInodesFree:
+ if: 'predict_linear(disk_inodes_free[1h], 8*3600) < 0'
+ labels:
+ severity: warning
+ service: system
+ annotations:
+ summary: 'Disk inodes ({{ $labels.path }}) are filling on {{ $labels.host }}'
+ description: 'Disk inodes ({{ $labels.path }}) will be full in 8h on {{ $labels.host }}'
+ AvgMemAvailablePercent:
+ if: 'avg_over_time(mem_available_percent[5m]) < 10'
+ labels:
+ severity: warning
+ service: system
+ annotations:
+ summary: 'Free memory is low on {{ $labels.host }}'
+ description: 'Free memory percent for node {{ $labels.host }} is low {{ $value }}'
+ SystemLoad5:
+ if: 'system_load5 / system_n_cpus > 3'
+ labels:
+ severity: warning
+ service: system
+ annotations:
+ summary: 'High system load (5m) on {{ $labels.host }}'
+ description: 'High system load (5m) on node {{ $labels.host }}'
+{% endraw %}
diff --git a/linux/system/repo.sls b/linux/system/repo.sls
index abb0ffb..6520d88 100644
--- a/linux/system/repo.sls
+++ b/linux/system/repo.sls
@@ -1,6 +1,9 @@
{%- from "linux/map.jinja" import system with context %}
{%- if system.enabled %}
+include:
+- linux.system.package
+
# global proxy setup
{%- if system.proxy.get('pkg', {}).get('enabled', False) %}
{%- if grains.os_family == 'Debian' %}
diff --git a/metadata/service/support.yml b/metadata/service/support.yml
index 023cff2..7699edd 100644
--- a/metadata/service/support.yml
+++ b/metadata/service/support.yml
@@ -1,6 +1,8 @@
parameters:
linux:
_support:
+ prometheus:
+ enabled: true
telegraf:
enabled: true
collectd: