gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-grid5k] 170/189: add node-exporter service files as not present i


From: gnunet
Subject: [taler-grid5k] 170/189: add node-exporter service files as not present in centos
Date: Thu, 28 Apr 2022 10:49:00 +0200

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository grid5k.

commit e830b9980b5eecea32ffaa388672b0309c750573
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Wed Apr 20 13:40:03 2022 +0200

    add node-exporter service files as not present in centos
---
 configs/etc/default/prometheus-node-exporter       | 217 +++++++++++++++++++++
 .../system/prometheus-node-exporter.service        |  15 ++
 docker/entrypoint.sh                               |  34 ++--
 image/centos8/taler-centos8.yaml                   |   4 +-
 4 files changed, 255 insertions(+), 15 deletions(-)

diff --git a/configs/etc/default/prometheus-node-exporter 
b/configs/etc/default/prometheus-node-exporter
new file mode 100644
index 0000000..a0d0520
--- /dev/null
+++ b/configs/etc/default/prometheus-node-exporter
@@ -0,0 +1,217 @@
+# Set the command-line arguments to pass to the server.
+# Due to shell scaping, to pass backslashes for regexes, you need to double
+# them (\\d for \d). If running under systemd, you need to double them again
+# (\\\\d to mean \d), and escape newlines too.
+ARGS=""
+
+# prometheus-node-exporter supports the following options:
+#
+#  --collector.arp
+#    Enable the arp collector (default: enabled).
+#  --collector.bcache
+#    Enable the bcache collector (default: enabled).
+#  --collector.bcache.priorityStats
+#    Expose expensive priority stats.
+#  --collector.bonding
+#    Enable the bonding collector (default: enabled).
+#  --collector.btrfs
+#    Enable the btrfs collector (default: enabled).
+#  --collector.buddyinfo
+#    Enable the buddyinfo collector (default: disabled).
+#  --collector.conntrack
+#    Enable the conntrack collector (default: enabled).
+#  --collector.cpu
+#    Enable the cpu collector (default: enabled).
+#  --collector.cpu.info
+#    Enables metric cpu_info.
+#  --collector.cpu.info.bugs-include=COLLECTOR.CPU.INFO.BUGS-INCLUDE
+#    Filter the `bugs` field in cpuInfo with a value that must be a regular
+#    expression.
+#  --collector.cpu.info.flags-include=COLLECTOR.CPU.INFO.FLAGS-INCLUDE
+#    Filter the `flags` field in cpuInfo with a value that must be a regular
+#    expression.
+#  --collector.cpufreq
+#    Enable the cpufreq collector (default: enabled).
+#  --collector.disable-defaults
+#    Set all collectors to disabled by default.
+#  --collector.diskstats
+#    Enable the diskstats collector (default: enabled).
+#  
--collector.diskstats.ignored-devices="^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$"
+#    Regexp of devices to ignore for diskstats.
+#  --collector.drbd
+#    Enable the drbd collector (default: disabled).
+#  --collector.edac
+#    Enable the edac collector (default: enabled).
+#  --collector.entropy
+#    Enable the entropy collector (default: enabled).
+#  --collector.fibrechannel
+#    Enable the fibrechannel collector (default: enabled).
+#  --collector.filefd
+#    Enable the filefd collector (default: enabled).
+#  --collector.filesystem
+#    Enable the filesystem collector (default: enabled).
+#  
--collector.filesystem.ignored-fs-types="^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$"
+#    Regexp of filesystem types to ignore for filesystem collector.
+#  
--collector.filesystem.ignored-mount-points="^/(dev|proc|run|sys|mnt|media|var/lib/docker/.+)($|/)"
+#    Regexp of mount points to ignore for filesystem collector.
+#  --collector.hwmon
+#    Enable the hwmon collector (default: enabled).
+#  --collector.infiniband
+#    Enable the infiniband collector (default: enabled).
+#  --collector.interrupts
+#    Enable the interrupts collector (default: disabled).
+#  --collector.ipvs
+#    Enable the ipvs collector (default: enabled).
+#  
--collector.ipvs.backend-labels="local_address,local_port,remote_address,remote_port,proto,local_mark"
+#    Comma separated list for IPVS backend stats labels.
+#  --collector.ksmd
+#    Enable the ksmd collector (default: disabled).
+#  --collector.loadavg
+#    Enable the loadavg collector (default: enabled).
+#  --collector.logind
+#    Enable the logind collector (default: disabled).
+#  --collector.mdadm
+#    Enable the mdadm collector (default: enabled).
+#  --collector.meminfo
+#    Enable the meminfo collector (default: enabled).
+#  --collector.meminfo_numa
+#    Enable the meminfo_numa collector (default: disabled).
+#  --collector.mountstats
+#    Enable the mountstats collector (default: disabled).
+#  --collector.netclass
+#    Enable the netclass collector (default: enabled).
+#  --collector.netclass.ignored-devices="^$"
+#    Regexp of net devices to ignore for netclass collector.
+#  --collector.netdev
+#    Enable the netdev collector (default: enabled).
+#  --collector.netdev.device-exclude="^lo$"
+#    Regexp of net devices to exclude (mutually exclusive to device-include).
+#  --collector.netdev.device-include=COLLECTOR.NETDEV.DEVICE-INCLUDE
+#    Regexp of net devices to include (mutually exclusive to device-exclude).
+#  --collector.netstat
+#    Enable the netstat collector (default: enabled).
+#  
--collector.netstat.fields="^(.*_(InErrors|InErrs)|Ip_Forwarding|Ip(6|Ext)_(InOctets|OutOctets)|Icmp6?_(InMsgs|OutMsgs)|TcpExt_(Listen.*|Syncookies.*|TCPSynRetrans)|Tcp_(ActiveOpens|InSegs|OutSegs|OutRsts|PassiveOpens|RetransSegs|CurrEstab)|Udp6?_(InDatagrams|OutDatagrams|NoPorts|RcvbufErrors|SndbufErrors))$"
+#    Regexp of fields to return for netstat collector.
+#  --collector.network_route
+#    Enable the network_route collector (default: disabled).
+#  --collector.nfs
+#    Enable the nfs collector (default: enabled).
+#  --collector.nfsd
+#    Enable the nfsd collector (default: enabled).
+#  --collector.ntp
+#    Enable the ntp collector (default: disabled).
+#  --collector.ntp.ip-ttl=1
+#    IP TTL to use while sending NTP query.
+#  --collector.ntp.local-offset-tolerance=1ms
+#    Offset between local clock and local ntpd time to tolerate.
+#  --collector.ntp.max-distance=3.46608s
+#    Max accumulated distance to the root.
+#  --collector.ntp.protocol-version=4
+#    NTP protocol version.
+#  --collector.ntp.server-is-local
+#    Certify that collector.ntp.server address is not a public ntp server.
+#  --collector.ntp.server="127.0.0.1"
+#    NTP server to use for ntp collector.
+#  --collector.perf
+#    Enable the perf collector (default: disabled).
+#  --collector.perf.cpus=""
+#    List of CPUs from which perf metrics should be collected.
+#  --collector.perf.tracepoint=COLLECTOR.PERF.TRACEPOINT...
+#    Perf tracepoint that should be collected.
+#  --collector.powersupply.ignored-supplies="^$"
+#    Regexp of power supplies to ignore for powersupplyclass collector.
+#  --collector.powersupplyclass
+#    Enable the powersupplyclass collector (default: enabled).
+#  --collector.pressure
+#    Enable the pressure collector (default: enabled).
+#  --collector.processes
+#    Enable the processes collector (default: disabled).
+#  --collector.qdisc
+#    Enable the qdisc collector (default: disabled).
+#  --collector.qdisc.fixtures=""
+#    Test fixtures to use for qdisc collector end-to-end testing.
+#  --collector.rapl
+#    Enable the rapl collector (default: enabled).
+#  --collector.runit
+#    Enable the runit collector (default: disabled).
+#  --collector.runit.servicedir="/etc/service"
+#    Path to runit service directory.
+#  --collector.schedstat
+#    Enable the schedstat collector (default: enabled).
+#  --collector.sockstat
+#    Enable the sockstat collector (default: enabled).
+#  --collector.softnet
+#    Enable the softnet collector (default: enabled).
+#  --collector.stat
+#    Enable the stat collector (default: enabled).
+#  --collector.supervisord
+#    Enable the supervisord collector (default: disabled).
+#  --collector.supervisord.url="http://localhost:9001/RPC2";
+#    XML RPC endpoint.
+#  --collector.systemd
+#    Enable the systemd collector (default: enabled).
+#  --collector.systemd.enable-restarts-metrics
+#    Enables service unit metric service_restart_total.
+#  --collector.systemd.enable-start-time-metrics
+#    Enables service unit metric unit_start_time_seconds.
+#  --collector.systemd.enable-task-metrics
+#    Enables service unit tasks metrics unit_tasks_current and unit_tasks_max.
+#  
--collector.systemd.unit-exclude=".+\\.(automount|device|mount|scope|slice|target)"
+#    Regexp of systemd units to exclude. Units must both match include and not
+#    match exclude to be included.
+#  --collector.systemd.unit-include=".+"
+#    Regexp of systemd units to include. Units must both match include and not
+#    match exclude to be included.
+#  --collector.tcpstat
+#    Enable the tcpstat collector (default: disabled).
+#  --collector.textfile
+#    Enable the textfile collector (default: enabled).
+#  --collector.textfile.directory="/var/lib/prometheus/node-exporter"
+#    Directory to read text files with metrics from.
+#  --collector.thermal_zone
+#    Enable the thermal_zone collector (default: enabled).
+#  --collector.time
+#    Enable the time collector (default: enabled).
+#  --collector.timex
+#    Enable the timex collector (default: enabled).
+#  --collector.udp_queues
+#    Enable the udp_queues collector (default: enabled).
+#  --collector.uname
+#    Enable the uname collector (default: enabled).
+#  --collector.vmstat
+#    Enable the vmstat collector (default: enabled).
+#  --collector.vmstat.fields="^(oom_kill|pgpg|pswp|pg.*fault).*"
+#    Regexp of fields to return for vmstat collector.
+#  --collector.wifi
+#    Enable the wifi collector (default: disabled).
+#  --collector.wifi.fixtures=""
+#    Test fixtures to use for wifi collector metrics.
+#  --collector.xfs
+#    Enable the xfs collector (default: enabled).
+#  --collector.zfs
+#    Enable the zfs collector (default: enabled).
+#  --collector.zoneinfo
+#    Enable the zoneinfo collector (default: disabled).
+#  --log.format=logfmt
+#    Output format of log messages. One of: [logfmt, json].
+#  --log.level=info
+#    Only log messages with the given severity or above. One of: [debug, info,
+#    warn, error].
+#  --path.procfs="/proc"
+#    Procfs mountpoint.
+#  --path.rootfs="/"
+#    Rootfs mountpoint.
+#  --path.sysfs="/sys"
+#    Sysfs mountpoint.
+#  --web.config=""
+#    [EXPERIMENTAL] Path to config yaml file that can enable TLS or
+#    authentication.
+#  --web.disable-exporter-metrics
+#    Exclude metrics about the exporter itself (promhttp_*, process_*, go_*).
+#  --web.listen-address=":9100"
+#    Address on which to expose metrics and web interface.
+#  --web.max-requests=40
+#    Maximum number of parallel scrape requests. Use 0 to disable.
+#  --web.telemetry-path="/metrics"
+#    Path under which to expose metrics.
+
diff --git a/configs/usr/lib/systemd/system/prometheus-node-exporter.service 
b/configs/usr/lib/systemd/system/prometheus-node-exporter.service
new file mode 100644
index 0000000..98c3317
--- /dev/null
+++ b/configs/usr/lib/systemd/system/prometheus-node-exporter.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Prometheus exporter for machine metrics
+Documentation=https://github.com/prometheus/node_exporter
+
+[Service]
+Restart=on-failure
+User=prometheus
+EnvironmentFile=/etc/default/prometheus-node-exporter
+ExecStart=/usr/bin/prometheus-node-exporter $ARGS
+ExecReload=/bin/kill -HUP $MAINPID
+TimeoutStopSec=20s
+SendSIGKILL=no
+
+[Install]
+WantedBy=multi-user.target
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index f21ed14..422b433 100644
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -101,19 +101,27 @@ if [ ! -f "build/taler-${IMAGE}/taler-${IMAGE}.tar.zst" ] 
|| \
 then
   rm -rf /tmp/taler-${IMAGE} ${TALER_HOME}/taler-${IMAGE} || true
   echo "INFO building image"
-  yes r | kameleon build \
-          -b /tmp taler-${IMAGE}.yaml \
-          -g gnunet_commit_sha:${GNUNET_COMMIT_SHA:-master} \
-             exchange_commit_sha:${EXCHANGE_COMMIT_SHA:-master} \
-             merchant_commit_sha:${MERCHANT_COMMIT_SHA:-master} \
-             wallet_commit_sha:${WALLET_COMMIT_SHA:-master} \
-            grid5k_commit_sha:${GRID5K_COMMIT_SHA:-master} \
-            libmicrohttpd_cflags:"${LIBMICROHTTPD_CFLAGS:--O2}" \
-            gnunet_cflags:"${GNUNET_CFLAGS:--O2}" \
-            exchange_cflags:"${EXCHANGE_CFLAGS:--O2}" \
-            merchant_cflags:"${MERCHANT_CFLAGS:--O2}" \
-             g5k_user:${GRID5K_USER} \
-       | tee build.log
+  if [[ "$IMAGE" == "debian11" ]]; then
+    yes r | kameleon build \
+            -b /tmp taler-${IMAGE}.yaml \
+            -g gnunet_commit_sha:${GNUNET_COMMIT_SHA:-master} \
+               exchange_commit_sha:${EXCHANGE_COMMIT_SHA:-master} \
+               merchant_commit_sha:${MERCHANT_COMMIT_SHA:-master} \
+               wallet_commit_sha:${WALLET_COMMIT_SHA:-master} \
+               grid5k_commit_sha:${GRID5K_COMMIT_SHA:-master} \
+               libmicrohttpd_cflags:"${LIBMICROHTTPD_CFLAGS:--O2}" \
+               gnunet_cflags:"${GNUNET_CFLAGS:--O2}" \
+               exchange_cflags:"${EXCHANGE_CFLAGS:--O2}" \
+               merchant_cflags:"${MERCHANT_CFLAGS:--O2}" \
+               g5k_user:${GRID5K_USER} \
+          | tee build.log
+  else
+    yes r | kameleon build \
+            -b /tmp taler-${IMAGE}.yaml \
+            -g g5k_user:${GRID5K_USER} \
+               grid5k_commit_sha:${GRID5K_COMMIT_SHA:-master} \
+          | tee build.log
+  fi
   mv /tmp/taler-${IMAGE} ${TALER_HOME}
 fi
 
diff --git a/image/centos8/taler-centos8.yaml b/image/centos8/taler-centos8.yaml
index 76361ad..367e944 100644
--- a/image/centos8/taler-centos8.yaml
+++ b/image/centos8/taler-centos8.yaml
@@ -91,8 +91,8 @@ setup:
          wget 
https://github.com/prometheus/node_exporter/releases/download/v$${taler_node_exporter_version}/node_exporter-$${taler_node_exporter_version}.linux-amd64.tar.gz
 -P /tmp
          cd /tmp
          tar xzf 
node_exporter-$${taler_node_exporter_version}.linux-amd64.tar.gz
-         mv 
node_exporter-$${taler_node_exporter_version}.linux-amd64/node_exporter 
/usr/local/bin/
-         chown node_exporter:node_exporter /usr/local/bin/node_exporter
+         mv 
node_exporter-$${taler_node_exporter_version}.linux-amd64/node_exporter 
/usr/local/bin/prometheus-node-exporter
+         chown node_exporter:node_exporter 
/usr/local/bin/prometheus-node-exporter
 
 export:
   ### The export section takes in charge the export of your customized 
Grid'5000

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]