M type/__evilham_alertmanager/man.rst => type/__evilham_alertmanager/man.rst +7 -10
@@ 8,13 8,8 @@ cdist-type__evilham_alertmanager - Setup a alertmanager service for prometheus
DESCRIPTION
-----------
-
-VictoriaMetrics is a monitoring software solution and time-series database,
-written in go. It can provide long-term storage for Prometheus.
-
-The object identification given to the type will be the subfolder use for the
-data storage inside the home directory for the user. This allows for multiple
-node instances in the same victoria metrics service.
+Alertmanager handles alerts sent by client applications like Prometheus. It's
+in charge of deduplicating, grouping and routing alerts to a correct reciever.
OPTIONAL PARAMETERS
-------------------
@@ 37,9 32,11 @@ EXAMPLES
--------
.. code-block:: sh
-
- __evilham_victoriametrics storage1 --user vm --storage-data-path '/var/lib/vm'\
- --retention-period 4w --http-listen-addr :8190 --extra-args '-search.disableCache'
+ # Setup alertmanager
+ __evilham_alertmanager \
+ --extra-args "--web.external-url='https://${__target_host}/am' \
+ --cluster.listen-address=[::1]:9094"
+ --config-file-source "${__files}/hosts/${__target_host}/am.yml"
AUTHORS
-------
A type/__evilham_prometheus/man.rst => type/__evilham_prometheus/man.rst +48 -0
@@ 0,0 1,48 @@
+cdist-type__evilham_prometheus(7)
+===================================
+
+NAME
+----
+cdist-type__evilham_prometheus - Setup a prometheus service
+
+
+DESCRIPTION
+-----------
+Prometheus is an open-source monitoring and alerting software solution. It
+stores metrics as time series data, alongside labels.
+
+OPTIONAL PARAMETERS
+-------------------
+user
+ User that owns the prometheus data directory.
+ Defaults to `prometheus`.
+
+data-path
+ Alternative path for the storage of prometheus.
+ Defaults to `/var/lib/ptometheus`.
+
+listen-address
+ Address and port to listen to TCP connections.
+ Defaults to `:9090`.
+
+extra-args
+ Extra arguments for configurating flags on prometheus.
+
+EXAMPLES
+--------
+
+.. code-block:: sh
+ # Setup Prometheus itself
+ __evilham_prometheus \
+ --extra-args "--web.external-url='https://${__target_host}/prometheus'\
+ --web.enable-admin-api" \
+ --config-file-source "${__files}/hosts/${__target_host}/prometheus.yml"
+
+AUTHORS
+-------
+Evilham <contact@evilham.com>
+Michelle <michellequinteroh@gmail.com>
+
+COPYING
+-------
+Copyright \(C) 2023 Evilham.
A type/__evilham_prometheus_blackbox_exporter/man.rst => type/__evilham_prometheus_blackbox_exporter/man.rst +50 -0
@@ 0,0 1,50 @@
+cdist-type__evilham_prometheus_blackbox_exporter(7)
+===================================
+
+NAME
+----
+cdist-type__evilham_prometheus_blackbox_exporter - blackbox exporter
+
+
+DESCRIPTION
+-----------
+Blackbox exporter is used to probe endpoints like HTTPS, HTTP, TCP,
+ICMP and DNS. Based on one endpoint, blackbox generates metrics that can
+be visualized through Grafana.
+
+OPTIONAL PARAMETERS
+-------------------
+user
+ User that owns the blackbox exporter data directory.
+ Defaults to `blackbox_exporter`.
+
+data-path
+ Alternative path for the storage of blackbox exporter.
+ Defaults to `/var/lib/blackbox_exporter`.
+
+listen-address
+ Address and port to listen to TCP connections.
+ Defaults to `:9115`.
+
+extra-args
+ Extra arguments for configurating flags on blackbox exporter.
+
+EXAMPLES
+--------
+
+.. code-block:: sh
+
+ # Blackbox exporter
+ __evilham_prometheus_blackbox_exporter \
+ --extra-args ' --log.level=debug ' \
+ --config-file-source \
+ "${__files}/hosts/${__target_host}/blackbox_exporter.yml"
+
+AUTHORS
+-------
+Evilham <contact@evilham.com>
+Michelle <michellequinteroh@gmail.com>
+
+COPYING
+-------
+Copyright \(C) 2023 Evilham.
M type/__evilham_victoriametrics/man.rst => type/__evilham_victoriametrics/man.rst +15 -2
@@ 44,8 44,21 @@ EXAMPLES
.. code-block:: sh
- __evilham_victoriametrics storage1 --user vm --storage-data-path '/var/lib/vm'\
- --retention-period 4w --http-listen-addr :8190 --extra-args '-search.disableCache'
+ # Setup Victoria Metrics instances
+ __evilham_victoriametrics vm0 \
+ --retention-period 5y --listen-address '[::1]:8420'
+ __evilham_victoriametrics vm1 \
+ --retention-period 5y --listen-address '[::1]:8421' \
+ --extra-args '-relabelConfig /var/lib/vm-data/vm1.relabel.yml'
+ require="__evilham_victoriametrics/vm0\
+ __file '/var/lib/vm-data/vm0.relabel.yml'\
+ --mode 0444 \
+ --source - <<EOF
+# Drop environment label
+- action: labeldrop
+ regex: 'environment'
+EOF
+"
AUTHORS
-------
M type/__evilham_victoriametrics_vmauth/man.rst => type/__evilham_victoriametrics_vmauth/man.rst +27 -28
@@ 51,34 51,33 @@ EXAMPLES
.. code-block:: sh
- # Setting up two victoria metrics nodes and configurating the vmauth proxy
- # for the two different victoria metrics nodes.
- CDIST_ORDER_DEPENDENCY=1
- export CDIST_ORDER_DEPENDENCY
-
- __evilham_victoriametrics storage1 --user vm \
- --storage-data-path '/var/lib/vm'\
- --retention-period 4w --listen-address :8891
-
- __evilham_victoriametrics storage2 --user vm \
- --storage-data-path '/var/lib/vm'\
- --retention-period 1w --listen-address :8890
-
- __evilham_victoriametrics_vmauth --user vmauth \
- --data-path '/var/lib/vm/vmauth'\
- --user-entry "$(cat << DONE
-- bearer_token: "XLKAAOWK"
- url_prefix: "https://victoria.example.org:8890"
-
-DONE
-)"\
-
- --user-entry "$(cat << DONE
-- username: "victoria-stats-admin"
- password: "vadmin2"
- url_prefix: "https://victoria.example.org:8891"
-DONE
-)"
+
+ # Setup Victoria Metrics instances
+ __evilham_victoriametrics vm0 \
+ --retention-period 5y --listen-address '[::1]:8420'
+ __evilham_victoriametrics vm1 \
+ --retention-period 5y --listen-address '[::1]:8421' \
+ --extra-args '-relabelConfig /var/lib/vm-data/vm1.relabel.yml'
+ require="__evilham_victoriametrics/vm0\
+ __file '/var/lib/vm-data/vm0.relabel.yml'\
+ --mode 0444 \
+ --source - <<EOF
+# Drop environment label
+- action: labeldrop
+ regex: 'environment'
+EOF
+"
+ # Now setup VM Auth to be infront of them
+ require="__evilham_victoriametrics/vm0 __evilham_victoriametrics/vm1"
+ __evilham_victoriametrics_vmauth \
+ --listen-address '[::1]:8428'\
+ --config-file-source - <<EOF
+- bearer_token: "$(cat "${__secret}/hosts/${__target_host}/vm0.token")"
+url_prefix: "http://[::1]:8420"
+- bearer_token: "$(cat "${__secret}/hosts/${__target_host}/vm1.token")"
+url_prefix: "http://[::1]:8421"
+EOF
+
SEE ALSO
--------