dot

packages and services management
Log | Files | Refs | README

commit a2f8ced0d112ddaab28bf6a7aaadf945a9a4d5c5
parent d2fefbdf20ae34bb6ca20ef14c962131bb362164
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sat, 17 Feb 2018 19:55:47 +0100

using hardcoded paths in $HOME

Diffstat:
M.profile | 35++++++++++++++---------------------
DREADME | 79-------------------------------------------------------------------------------
Mbin/agenda | 2+-
Mbin/dvtm-status | 2+-
Mbin/io | 2+-
Mbin/irc | 4++--
Mbin/log | 4++--
Mbin/mfilter | 18++++++++++--------
Mbin/msearch | 2+-
Mbin/pack | 18+++++++++---------
Mbin/qemu | 16++++++++--------
Mbin/run | 6+++---
Mbin/twt | 42+++++++++++++++++++++++-------------------
Mbin/update-sfeed | 16++++++++--------
Mbin/xdg-open | 52++++++++++++++++++++++++++--------------------------
Mconfigure | 6++++--
Mman/configure.7 | 79+++++++++++++++++++++++++++++--------------------------------------------------
Mmblaze/filter | 2++
Mpack/collectd/build | 4++--
Mpack/libmusl/build | 2+-
Mpack/mpop/build | 6+++---
Mpack/msmtp/build | 4++--
Mpack/ngircd/build | 2+-
Mpack/opentracker/build | 4++--
Mrun/collectd | 8++++----
Mrun/crond | 4++--
Mrun/geomyidae | 4++--
Mrun/git | 6+++---
Mrun/ii | 8++++----
Mrun/inetd | 4++--
Mrun/irc.cyberia.is | 8++++----
Mrun/irc.freenode.net | 8++++----
Mrun/irc.oftc.net | 8++++----
Mrun/ngircd | 4++--
Mrun/opentracker | 6+++---
Mrun/quark | 4++--
Mrun/ratox | 6+++---
Mrun/ssh-agent | 4++--
Mrun/tincd | 4++--
Mrun/tor | 4++--
Mrun/unix.chat | 8++++----
Dskel/collectd.conf | 1819-------------------------------------------------------------------------------
42 files changed, 204 insertions(+), 2120 deletions(-)

diff --git a/.profile b/.profile @@ -2,7 +2,7 @@ export NAME='Josuah Demangeon' export TZ='Europe/Paris' export NICK='josuah' export EMAIL='mail@josuah.net' -export MAILTO="${EMAIL}" +export MAILTO="$EMAIL" export EDITOR='edit' VISUAL='edit' export PAGER='less' MANPAGER='less' @@ -15,33 +15,26 @@ export LC_MESSAGES='en_US.UTF-8' export LC_NUMERIC='en_US.UTF-8' export LC_TIME='en_US.UTF-8' -export ETC="${HOME}/.config" # /etc installed configuration -export SYS="${HOME}/.local" # /usr/local package installation path -export VAR="${HOME}/.cache" # /var generated data -export LIB="${HOME}/lib" # original data -export RUN="${VAR}/run" # /var/run runtime information -export LOG="${VAR}/log" # /var/log log files - -export MAIL="${VAR}/mail/mbox" -export PLAN9="${SYS}/src/plan9" -export PATH="${HOME}/etc/bin:${SYS}/bin:${PATH}:${PLAN9}/bin" -export MANPATH="${HOME}/etc/man:/usr/share/man:/usr/local/man" -export MANPATH="${SYS}/share/man:${MANPATH}:${PLAN9}/man" -export C_INCLUDE_PATH="${SYS}/include" -export LIBRARY_PATH="${SYS}/lib:/usr/local/lib/inotify" -export LD_LIBRARY_PATH="${SYS}/lib:/usr/local/lib/inotify" +export SYSROOT="$HOME/.local" +export PLAN9="$SYSROOT/src/plan9" +export PATH="$HOME/etc/bin:$SYSROOT/bin:$PATH:$PLAN9/bin" +export MANPATH="$HOME/etc/man:/usr/share/man:/usr/local/man" +export MANPATH="$SYSROOT/share/man:$MANPATH:$PLAN9/man" +export C_INCLUDE_PATH="$SYSROOT/include" +export LIBRARY_PATH="$SYSROOT/lib:/usr/local/lib/inotify" +export LD_LIBRARY_PATH="$SYSROOT/lib:/usr/local/lib/inotify" export BLIH='josuah.demangeon@epitech.eu' export CVSROOT='anoncvs@anoncvs.fr.openbsd.org:/cvs' export PKG_PATH='https://ftp.fr.openbsd.org/pub/OpenBSD/' -export ABDUCO_SOCKET_DIR="${RUN}" +export ABDUCO_SOCKET_DIR="$HOME/var/run" export ABDUCO_CMD='dvtm-status' -export MBLAZE="${ETC}/mblaze" +export MBLAZE="$HOME/.config/mblaze" export LESS='-R~X' export LESSHISTFILE='-' -export SSH_AUTH_SOCK="${RUN}/ssh-agent" +export SSH_AUTH_SOCK="$HOME/var/run/ssh-agent" export EXINIT='set ruler' -export PS1='$([ "${?}" -gt 0 ] && printf "\033[31;1mx\033[m\n\r")' -export PS1="${PS1}$(printf '\033]0;%s\a' '${PWD}') +export PS1='$([ "$?" -gt 0 ] && printf "\033[31;1mx\033[m\n\r")' +export PS1="$PS1$(printf '\033]0;%s\a' '$PWD') $(uname -n)$([ "$(whoami)" = 'root' ] && printf '#' || printf '$') " diff --git a/README b/README @@ -1,79 +0,0 @@ -./CONFIGURE(7) Miscellaneous Information Manual ./CONFIGURE(7) - -NAME - ./configure setup symlinks for portable configuration - -SYNOPSIS - ./configure - . ~/.profile - -DESCRIPTION - ./configure symlinks files from this directory into the $ETC directory as - defined in ./.profile and symlinks everything matching .* into the home - directory. - -ENVIRONMENT - Path used across the configuration are setup by the following environment - variables: - - VAR Sets the directory containing all generated data, including irc, - mail, tox, qemu images... Usually /var, set to ~/.cache. - - RUN Sets the directory containig information and pipes conserning - currently running programs. Usually /var/run or /run, set to - ${VAR}/run. - - LOG Set the directory containing logs for each program. Usually - /var/log, set to ${VAR}/log. - - ETC Local configuration directory, where software are configured to - search their configuration file. Usually /etc, set to ~/.config. - - SYS Alternate system root in which software are downloaded, build, - and installed (via symlinks). Usually /usr or /usr/local, set to - ~/.local. - - LIB Directory where original data are stored. Usually ~, set to - ~/lib. - -FILES - ./pack/ - Contains one directory per package with all information to build - it. - - ./daemon/ - Contains one scripts per daemon, which start it while invoked, - optionnally with arguments. - - ./bin/ Contains scripts collection to maintain the configuration and - more. - - ./man/ Contains manual pages for utilities developed inside of ./bin/. - - ./.* Files to be symlinked into the home directory, with exception of - .git. - - ./skel/ - Contains files to be manually copied in-place and then edited. - -SEE ALSO - pack(1) - A package manager permits to fetch and install missing software - and libraries according to rules in subdirectories of ./pack. - - run(1), log(1) - A daemon management script which calls the scirpts in ./run to - manage different software in an uniform manner. - - xdg-open(1) - A general-purpose piping utility which chooses the apropriate - program to open the file passed as argument. - -STANDARDS - This set of configurations and scripts try to comply with IEEE Std 1003.1 - (POSIX.1) and to keep the amount of external dependencies low. - -AUTHORS - Josuah Demangeon <mail@josuah.net> - -OpenBSD 6.2 February 9, 2018 OpenBSD 6.2 diff --git a/bin/agenda b/bin/agenda @@ -1,7 +1,7 @@ #!/bin/sh # plain text agenda reading ical with its own simpler format -AGENDA="${AGENDA:-${ETC:-$HOME/.config}/agenda}" +AGENDA="${AGENDA:-$HOME/.config/agenda}" date=' diff --git a/bin/dvtm-status b/bin/dvtm-status @@ -1,6 +1,6 @@ #!/bin/sh -FIFO="$RUN/dvtm-status.${$}" +FIFO="$HOME/var/run/dvtm-status.${$}" [ -p "$FIFO" ] || mkfifo -m 600 "$FIFO" || exit 1 diff --git a/bin/io b/bin/io @@ -75,7 +75,7 @@ EOF cut -c $((${#HOME} + 2))- | xargs -I {} printf '%s/%s\n' "$cache" {} | xargs -I {} cat "$cache" {} 2> /dev/null | - cat - "$ETC/uri" | + cat - "$HOME/.config/uri" | iomenu -# | cut -f 2-)" ;; diff --git a/bin/irc b/bin/irc @@ -5,7 +5,7 @@ if [ "$#" -eq 1 ] then [ "$1" ] || exit 1 eel < "$1/out" | less - srw -p "${1##$VAR/irc/}> " sh -c ' + srw -p "${1##$HOME/var/irc/}> " sh -c ' tail -n 80 -f "$0/out" | eel & cat > "$0/in" ' "$1" @@ -13,4 +13,4 @@ fi trap '' INT -exec "$0" "$(find "$VAR/irc" -mindepth 1 -type d | iomenu)" +exec "$0" "$(find "$HOME/var/irc" -mindepth 1 -type d | iomenu)" diff --git a/bin/log b/bin/log @@ -1,5 +1,5 @@ #!/bin/sh -[ "$#" -ge 1 ] || exec ls -R "$VAR/log/$1" +[ "$#" -ge 1 ] || exec ls -R "$HOME/var/log/$1" -exec less "$VAR/log/$1" +exec less "$HOME/var/log/$1" diff --git a/bin/mfilter b/bin/mfilter @@ -1,16 +1,18 @@ #!/bin/sh # read and filter mails using mblaze -minc "$VAR/mail/INBOX" > "$ETC/mblaze/seq.mfilter" +minc "$HOME/var/mail/INBOX" > "$HOME/.config/mblaze/seq.mfilter" -[ "$1" = '-a' ] && mdirs "$VAR/mail" | mlist > "$ETC/mblaze/seq.mfilter" +[ "$1" = '-a' ] && + mdirs "$HOME/var/mail" | mlist > "$HOME/.config/mblaze/seq.mfilter" +sed 's/#.*//; /^[[:space:]]*$/ d' "$HOME/.config/mblaze/filter" | while read -r dir header glob do - mkdir -p "$VAR/mail/$dir/cur" \ - "$VAR/mail/$dir/new" \ - "$VAR/mail/$dir/tmp" + mkdir -p "$HOME/var/mail/$dir/cur" \ + "$HOME/var/mail/$dir/new" \ + "$HOME/var/mail/$dir/tmp" printf '%-35s' "$dir" 1>&2 - mpick -t "$header ~~~ $glob" < "$ETC/mblaze/seq.mfilter" | - xargs -rI {} mv {} "$VAR/mail/$dir/new" -done < "$ETC/mblaze/filter" 2>&1 | less + mpick -t "$header ~~~ $glob" < "$HOME/.config/mblaze/seq.mfilter" | + xargs -rI {} mv {} "$HOME/var/mail/$dir/new" +done 2>&1 | less diff --git a/bin/msearch b/bin/msearch @@ -1,3 +1,3 @@ #!/bin/sh -e -mdirs "$VAR/mail" | mlist | mpick "$@" | mseq -S | mscan +mdirs "$HOME/var/mail" | mlist | mpick "$@" | mseq -S | mscan diff --git a/bin/pack b/bin/pack @@ -1,10 +1,10 @@ #!/bin/sh -e -export PKG="$ETC/pack/$2" -export SRC="$SYS/src/$2" -export OPT="$SYS/opt/$2" -export CFLAGS="-I'$SYS/include'" -export LDFLAGS="-L'$SYS/lib'" +export PKG="$HOME/.config/pack/$2" +export SRC="$SYSROOT/src/$2" +export OPT="$SYSROOT/opt/$2" +export CFLAGS="-I'$SYSROOT/include'" +export LDFLAGS="-L'$SYSROOT/lib'" case "$1" in (tar) @@ -49,17 +49,17 @@ case "$1" in [ -d "$OPT" ] || "$0" build "$2" || rm -r "$OPT" cd "$OPT" && exec find * -type d \ - -exec mkdir -p "$SYS/{}" \; -o \ - -exec ln -sf "$OPT/{}" "$SYS/{}" \; + -exec mkdir -p "$SYSROOT/{}" \; -o \ + -exec ln -sf "$OPT/{}" "$SYSROOT/{}" \; ;; (del) rm -rf "$OPT" - find -L "$SYS" -name opt -prune -o -name src -prune -o \ + find -L "$SYSROOT" -name opt -prune -o -name src -prune -o \ -type l -exec rm {} + ;; (*) echo 'usage: pack tar | git | get | build | add | del <package>' echo '' - COLUMNS=80 ls "$ETC/pack" + COLUMNS=80 ls "$HOME/.config/pack" ;; esac diff --git a/bin/qemu b/bin/qemu @@ -1,16 +1,16 @@ #!/bin/sh -e -mkdir -p "$LOG/qemu" "$VAR/qemu" "$LIB/iso/qemu" +mkdir -p "$HOME/var/log/qemu" "$HOME/var/qemu" "$HOME/lib/iso/qemu" case "$1" in (new) - [ "$#" -ne 3 ] || ! [ -r "$LIB/iso/qemu/$3" ] || + [ "$#" -ne 3 ] || ! [ -r "$HOME/lib/iso/qemu/$3" ] || exec "$0" - cp "$LIB/iso/qemu/$2" "$VAR/qemu/$3" + cp "$HOME/lib/iso/qemu/$2" "$HOME/var/qemu/$3" ;; (start) - [ "$#" -ne 3 ] || ! [ -r "$LIB/iso/qemu/$2" ] || + [ "$#" -ne 3 ] || ! [ -r "$HOME/lib/iso/qemu/$2" ] || exec "$0" beg='10000' @@ -28,18 +28,18 @@ case "$1" in -device e1000,netdev=net0 \ -netdev user,id=net0,hostfwd=tcp::$port-:22 \ -display none \ - "$VAR/qemu/$2" \ - 1>> "$LOG/qemu/$2" & + "$HOME/var/qemu/$2" \ + 1>> "$HOME/var/log/qemu/$2" & ;; (*) echo 'usage: qemu start <name.img>' 1>&2 echo ' qemu new <ref.img> <new.img>' 1>&2 echo 'store:' 1>&2 - ls "$LIB/iso/qemu" | sed 's/^/ /' 1>&2 + ls "$HOME/lib/iso/qemu" | sed 's/^/ /' 1>&2 echo 'created:' 1>&2 - ls "$VAR/qemu" | sed 's/^/ /' 1>&2 + ls "$HOME/var/qemu" | sed 's/^/ /' 1>&2 echo 'running:' 1>&2 { diff --git a/bin/run b/bin/run @@ -1,7 +1,7 @@ #!/bin/sh -e -mkdir -p "$LOG" +mkdir -p "$HOME/var/log" -[ "$#" -ge 1 ] || exec ls "$ETC/run" +[ "$#" -ge 1 ] || exec ls "$HOME/.config/run" -exec "$ETC/run/$@" +exec "$HOME/.config/run/$@" diff --git a/bin/twt b/bin/twt @@ -87,8 +87,8 @@ err() exit 1 } -mkdir -p "$VAR/twt" -touch "$ETC/twt" +mkdir -p "$HOME/.cache/twt" +touch "$HOME/.config/twt" case "$1" in (tweet) @@ -101,52 +101,56 @@ case "$1" in new=$(printf %s "$usr" | sed 's/[&/\]/\\&/g') usr=$(printf %s "$usr" | sed 's/./[&]/g') msg=$(printf %s "$msg" | sed "s/@$usr/@<$new $url>/") - done < "$ETC/twt" + done < "$HOME/.config/twt" printf '%s\t%s\n' "$(date +'%Y-%m-%dT%T%z' | sed 's/..$/:&/')" "$msg" \ >> "$TWT" ;; (view) [ "$#" -ne 2 ] && exec "$0" - [ -f "$VAR/twt/$2" ] || err "$2 feed not found, try update" + [ -f "$HOME/.cache/twt/$2" ] || + err "$2 feed not found, try update" - awk "$awk_line" "$VAR/twt/$2" | sort -r | awk "$awk_show" | $PAGER + awk "$awk_line" "$HOME/.cache/twt/$2" | sort -r | + awk "$awk_show" | $PAGER ;; (timeline) [ "$#" -ne 1 ] && exec "$0" - ls "$VAR/twt"/* 2> /dev/null 1>&2 || err 'no feed found, try to update' + ls "$HOME/.cache/twt"/* 2> /dev/null 1>&2 || + err 'no feed found, try to update' - awk "$awk_line" "$VAR/twt"/* | sort -r | awk "$awk_show" | $PAGER + awk "$awk_line" "$HOME/.cache/twt"/* | sort -r | + awk "$awk_show" | $PAGER ;; (update) while read -r usr url do - curl -m 10 -#L "$url" > "$VAR/twt/$usr" || - rm "$VAR/twt/$usr" & - done < "$ETC/twt" + curl -m 10 -#L "$url" > "$HOME/.cache/twt/$usr" || + rm "$HOME/.cache/twt/$usr" & + done < "$HOME/.config/twt" wait ;; (follow) [ "$#" -ne 3 ] && exec "$0" - sed 's/[[:space:]].*//' "$ETC/twt" | grep -Fqx "$2" && - err "already following $2" + sed 's/[[:space:]].*//' "$HOME/.config/twt" | grep -Fqx "$2" && + err "already following $2" - printf '%s\t%s\n' "$2" "$3" >> "$ETC/twt" - sort -uo "$ETC/twt" "$ETC/twt" + printf '%s\t%s\n' "$2" "$3" >> "$HOME/.config/twt" + sort -uo "$HOME/.config/twt" "$HOME/.config/twt" ;; (unfollow) [ "$#" -ne 2 ] && exec "$0" - sed 's/[[:space:]].*//' "$ETC/twt" | grep -Fqx "$2" || - err "not following $2" + sed 's/[[:space:]].*//' "$HOME/.config/twt" | grep -Fqx "$2" || + err "not following $2" - sed "/^$(printf %s "$2" | sed 's/./[&]/g')[[:space:]]/ d" "$ETC/twt" | - sort -uo "$ETC/twt" + sed "/^$(printf %s "$2" | sed 's/./[&]/g')[[:space:]]/ d" "$HOME/.config/twt" | + sort -uo "$HOME/.config/twt" ;; (following) [ "$#" -ne 1 ] && exec "$0" sed -r 's/[[:space:]]/ /; s/(.{12}[^ ]*) */\1 @ /' \ - "$ETC/twt" + "$HOME/.config/twt" ;; (*) printf 'usage: twt [tweet msg | view user | timeline | update\n' diff --git a/bin/update-sfeed b/bin/update-sfeed @@ -1,18 +1,18 @@ #!/bin/sh # update feeds, merge with old feeds. -mkdir -p "$VAR/sfeed" +mkdir -p "$HOME/var/sfeed" while read -r name url do - file="$VAR/sfeed/$name" + file="$HOME/var/sfeed/$name" printf '%-30s %s\n' "$name" "$url" touch "$file" - mkdir -p "$VAR/sfeed" \ - "$VAR/mail/sfeed/$name/new" \ - "$VAR/mail/sfeed/$name/cur" \ - "$VAR/mail/sfeed/$name/tmp" + mkdir -p "$HOME/var/sfeed" \ + "$HOME/var/mail/sfeed/$name/new" \ + "$HOME/var/mail/sfeed/$name/cur" \ + "$HOME/var/mail/sfeed/$name/tmp" # fetch then sort and merge by id, link, title curl -#LH 'User-Agent:' "$url" | @@ -21,5 +21,5 @@ do sort -t ' ' -k1rn,1 -o "$file" # deliver using mblaze(7) - sfeed_mbox "$file" | mdeliver -M "$VAR/mail/sfeed/$name" -done < "$ETC/sfeed" + sfeed_mbox "$file" | mdeliver -M "$HOME/var/mail/sfeed/$name" +done < "$HOME/.config/sfeed" diff --git a/bin/xdg-open b/bin/xdg-open @@ -65,7 +65,7 @@ esac case "$scheme" in (9p) - dir="$VAR/9p/$address" + dir="$HOME/var/9p/$address" mkdir -p "$dir" exec doas 9pfs "$address" "$dir" ;; @@ -83,48 +83,48 @@ case "$scheme" in (http|https) case "$host" in (vimeo.com|*youtube.com|*youtu.be|*openload.co*) - mkdir -p "$LIB/video/$host" - cd "$LIB/video/$host" + mkdir -p "$HOME/lib/video/$host" + cd "$HOME/lib/video/$host" youtube-dl "$1" - exec "$0" "$LIB/video/$host"/*"${1##*[=/]}"* + exec "$0" "$HOME/lib/video/$host"/*"${1##*[=/]}"* ;; (*bandcamp.com) - mkdir -p "$LIB/music/$host" - cd "$LIB/music/$host" + mkdir -p "$HOME/lib/music/$host" + cd "$HOME/lib/music/$host" exec youtube-dl "$1" ;; esac case "$path" in (*.torrent) - mkdir -p "$VAR/torrent" - curl -Lo "$VAR/torrent/${path##*/}" "$1" - exec "$0" "$VAR/torrent/${path##*/}" + mkdir -p "$HOME/var/torrent" + curl -Lo "$HOME/var/torrent/${path##*/}" "$1" + exec "$0" "$HOME/var/torrent/${path##*/}" ;; (*.jpg|*.JPG|*.jpeg|*.JPEG|*.png|*.PNG|*.gif) - mkdir -p "$LIB/image/$host/" - curl -Lo "$LIB/image/$host/${path##*/}" "$1" - exec "$0" "$LIB/image/$host/${path##*/}" + mkdir -p "$HOME/lib/image/$host/" + curl -Lo "$HOME/lib/image/$host/${path##*/}" "$1" + exec "$0" "$HOME/lib/image/$host/${path##*/}" ;; (*.opus|*.ogg|*.mp3|*.flac) - mkdir -p "$LIB/music/$host" - curl -Lo "$LIB/music/$host/${path##*/}" "$1" - exec "$0" "$LIB/music/$host/${path##*/}" + mkdir -p "$HOME/lib/music/$host" + curl -Lo "$HOME/lib/music/$host/${path##*/}" "$1" + exec "$0" "$HOME/lib/music/$host/${path##*/}" ;; (*.webm|*.mp4|*.mkv|*.ogv|*.avi) - mkdir -p "$LIB/video/$host" - curl -Lo "$LIB/video/$host/${path##*/}" "$1" - exec "$0" "$LIB/video/$host/${path##*/}" + mkdir -p "$HOME/lib/video/$host" + curl -Lo "$HOME/lib/video/$host/${path##*/}" "$1" + exec "$0" "$HOME/lib/video/$host/${path##*/}" ;; (*.pdf|*.ps) - mkdir -p "$LIB/doc/$host" - curl -Lo "$LIB/doc/$host/${path##*/}" "$1" - exec "$0" "$LIB/doc/$host/${path##*/}" + mkdir -p "$HOME/lib/doc/$host" + curl -Lo "$HOME/lib/doc/$host/${path##*/}" "$1" + exec "$0" "$HOME/lib/doc/$host/${path##*/}" ;; (*.txt) - mkdir -p "$LIB/text/$host" - curl -Lo "$LIB/text/$host/${path##*/}" "$1" - exec "$0" "$LIB/text/$host/${path##*/}" + mkdir -p "$HOME/lib/text/$host" + curl -Lo "$HOME/lib/text/$host/${path##*/}" "$1" + exec "$0" "$HOME/lib/text/$host/${path##*/}" ;; (*.gz|*.bz2|*.xz|*.tgz|*.tgz|*.tbz2|*.txz) mkdir -p "$HOME/tmp" @@ -139,10 +139,10 @@ case "$scheme" in ;; (irc) [ "$port" = . ] && port='6667' - "$ETC/daemon/ii" "$host" "$port" + "$HOME/.config/daemon/ii" "$host" "$port" [ "$path" = . ] && exit sleep 3 - printf '/j #%s\n' "$path" > "$VAR/irc/$host/in" + printf '/j #%s\n' "$path" > "$HOME/var/irc/$host/in" ;; (news) exec retawq "$1" diff --git a/configure b/configure @@ -3,9 +3,11 @@ cd "$0/.." . ./.profile +mkdir -p "$HOME/var" + find . -path './.*' -prune \ - -o -type d -exec mkdir -p "$ETC/{}" \; \ - -o -type f -exec ln -sf "$PWD/{}" "$ETC/{}" \; + -o -type d -exec mkdir -p "$HOME/.config/{}" \; \ + -o -type f -exec ln -sf "$PWD/{}" "$HOME/.config/{}" \; find .* -name .git -prune -o -name . -prune -o -name .. -prune \ -o -type d -exec mkdir -p "$HOME/{}" \; \ diff --git a/man/configure.7 b/man/configure.7 @@ -21,10 +21,8 @@ . .Nm symlinks files from this directory into the -.Pa $ETC -directory as defined in -.Pa ./.profile -and symlinks everything matching +.Pa ~/.config +directory and symlinks everything matching .Pa .* into the home directory. . @@ -34,62 +32,43 @@ into the home directory. Path used across the configuration are setup by the following environment variables: . +. +.Sh FILES +. +.Ss Path on the user's home directory +. .Bl -tag -width 6n . -.It Ev VAR -Sets the directory containing all generated data, including irc, mail, tox, -qemu images... -Usually -.Pa /var , -set to -.Pa ~/.cache . -. -.It Ev RUN -Sets the directory containig information and pipes conserning currently -running programs. -Usually -.Pa /var/run -or -.Pa /run , -set to -.Pa ${VAR}/run . -. -.It Ev LOG -Set the directory containing logs for each program. -Usually -.Pa /var/log , -set to -.Pa ${VAR}/log . -. -.It Ev ETC +.It Pa ~/lib +Directory where original data are stored. +. +.It Pa ~/var +Sets the directory containing all +.Sy generated data , +including irc, mail, tox, torrent, qemu images... +. +.It Pa ~/var/run +Information and pipes for currently running programs. +. +.It Pa ~/var/log +Logs for each program started by +.Xr run 1 . +. +.It Pa ~/.cache +Directory containing generated data cached for increasing performances. +. +.It Pa ~/.config Local configuration directory, where software are configured to search their configuration file. -Usually -.Pa /etc , -set to -.Pa ~/.config . . -.It Ev SYS +.It Pa ~/.local Alternate system root in which software are downloaded, build, and installed .Pq via symlinks . -Usually -.Pa /usr -or -.Pa /usr/local , -set to -.Pa ~/.local . -. -.It Ev LIB -Directory where original data are stored. -Usually -.Pa ~ , -set to -.Pa ~/lib . . .El . . -.Sh FILES +.Ss Path within this project . .Bl -tag -width 6n . @@ -122,7 +101,7 @@ Contains files to be manually copied in-place and then edited. .Bl -tag -width 6n . .It Xr pack 1 -A package manager permits to fetch and install missing software and libraries +A package manager which to fetch and install missing software and libraries, according to rules in subdirectories of .Pa ./pack . . diff --git a/mblaze/filter b/mblaze/filter @@ -60,6 +60,8 @@ transports "From" "*sncf.com*" transports "From" "*sobus.com*" transports "From" "*trainline.com*" univ-rennes1.fr "List-Id" "*univ-rennes1.fr*" + +# test wikimedia.org "From" "*wikimedia.org*" wordpress.com "From" "*wordpress.com*" yammer.com "From" "*yammer.com*" diff --git a/pack/collectd/build b/pack/collectd/build @@ -5,8 +5,8 @@ ./configure \ --prefix="$OPT" \ --sbindir="$OPT/bin" \ - --localstatedir="$VAR" \ - --sysconfdir="$ETC" \ + --localstatedir="$HOME/var" \ + --sysconfdir="$HOME/.config" \ --disable-perl \ --disable-python \ --disable-lua \ diff --git a/pack/libmusl/build b/pack/libmusl/build @@ -2,7 +2,7 @@ set -e export LDFLAGS="$LDFLAGS -Wl,-rpath-link=$SYSROOT$OPT/lib" -export CC="$CC -L$SYS/lib -isystem $SYS/include" +export CC="$CC -L$SYSROOT/lib -isystem $SYSROOT/include" [ -n "$CROSS_COMPILE" ] && CONFFLAGS="$CONFFLAGS --host=$CROSS_COMPILE" diff --git a/pack/mpop/build b/pack/mpop/build @@ -1,7 +1,7 @@ #!/bin/sh -e -export libssl_CFLAGS="-I$SYS/include" -export libssl_LIBS="-L$SYS/lib -lssa -lcrypto" +export libssl_CFLAGS="-I$SYSROOT/include" +export libssl_LIBS="-L$SYSROOT/lib -lssa -lcrypto" ./configure \ --prefix="$OPT" \ @@ -9,6 +9,6 @@ export libssl_LIBS="-L$SYS/lib -lssa -lcrypto" make \ CFLAGS="$libssl_CFLAGS" \ - LDFLAGS="-L$SYS/lib -lssl -lcrypto" \ + LDFLAGS="-L$SYSROOT/lib -lssl -lcrypto" \ make PREFIX="$OPT" install diff --git a/pack/msmtp/build b/pack/msmtp/build @@ -1,7 +1,7 @@ #!/bin/sh -e -export libssl_CFLAGS="-I$SYS/include" -export libssl_LIBS="-L$SYS/lib -lssl -lcrypto" +export libssl_CFLAGS="-I$SYSROOT/include" +export libssl_LIBS="-L$SYSROOT/lib -lssl -lcrypto" ./configure \ diff --git a/pack/ngircd/build b/pack/ngircd/build @@ -2,7 +2,7 @@ ./configure \ --prefix="$OPT" \ - --sysconfdir="$ETC" \ + --sysconfdir="$HOME/.config" \ --sbindir="$OPT/bin" --with-openssl diff --git a/pack/opentracker/build b/pack/opentracker/build @@ -1,7 +1,7 @@ #!/bin/sh -e make \ - LIBOWFAT_HEADERS="$SYS/include" \ - LIBOWFAT_LIBRARY="$SYS/lib" + LIBOWFAT_HEADERS="$SYSROOT/include" \ + LIBOWFAT_LIBRARY="$SYSROOT/lib" make PREFIX="$OPT" install diff --git a/run/collectd b/run/collectd @@ -2,7 +2,7 @@ exec collectd \ -f \ - -P "$RUN/collectd.pid" \ - -C "$ETC/collectd.conf" \ - 1>> "$LOG/collectd" \ - 2>> "$LOG/collectd" & + -P "$HOME/var/run/collectd.pid" \ + -C "$HOME/.config/collectd.conf" \ + 1>> "$HOME/var/log/collectd" \ + 2>> "$HOME/var/log/collectd" & diff --git a/run/crond b/run/crond @@ -2,5 +2,5 @@ exec crond \ -f "/etc/crontab" \ - 1>> "$LOG/crond" \ - 2>> "$LOG/crond" & + 1>> "$HOME/var/log/crond" \ + 2>> "$HOME/var/log/crond" & diff --git a/run/geomyidae b/run/geomyidae @@ -8,5 +8,5 @@ exec geomyidae \ -b "$path" \ -p "$port" \ -h "$host" \ - 1>> "$LOG/geomyidae" \ - 2>> "$LOG/geomyidae" & + 1>> "$HOME/var/log/geomyidae" \ + 2>> "$HOME/var/log/geomyidae" & diff --git a/run/git b/run/git @@ -1,11 +1,11 @@ #!/bin/sh -e path="${1:-$HOME/srv/git}" -port="${2:-9000}" +port="${2:-9418}" exec git daemon \ --base-path="$path" \ --export-all \ --port="$port" \ - 1>> "$LOG/git" \ - 2>> "$LOG/git" & + 1>> "$HOME/var/log/git" \ + 2>> "$HOME/var/log/git" & diff --git a/run/ii b/run/ii @@ -3,14 +3,14 @@ host="${1:?host required}" port="${2:-6667}" -mkdir -p "$VAR/irc/$host" "$LOG/ii" +mkdir -p "$HOME/var/irc/$host" "$HOME/var/log/ii" pgrep -f "ii -s $host" || exec ii \ -s "$host" \ - -i "$VAR/irc" \ + -i "$HOME/var/irc" \ -p "$port" \ -n "$NICKii" \ -k "PASS" \ -f "$NAME" \ - 1>> "$VAR/irc/$host/log" \ - 2>> "$LOG/ii/$host" & + 1>> "$HOME/var/irc/$host/log" \ + 2>> "$HOME/var/log/ii/$host" & diff --git a/run/inetd b/run/inetd @@ -1,5 +1,5 @@ #!/bin/sh -e exec inetd \ - 1>> "$LOG/inetd" \ - 2>> "$LOG/inetd" & + 1>> "$HOME/var/log/inetd" \ + 2>> "$HOME/var/log/inetd" & diff --git a/run/irc.cyberia.is b/run/irc.cyberia.is @@ -2,14 +2,14 @@ host='irc.cyberia.is' -mkdir -p "$VAR/irc/$host" "$LOG/ii" +mkdir -p "$HOME/var/irc/$host" "$HOME/var/log/ii" pgrep -f "ii -s $host" || exec ii \ -s "$host" \ - -i "$VAR/irc" \ + -i "$HOME/var/irc" \ -u "/tmp/$host" \ -n "$NICKii" \ -k "PASS" \ -f "$NAME" \ - 1>> "$VAR/irc/$host/log" \ - 2>> "$LOG/ii/$host" & + 1>> "$HOME/var/irc/$host/log" \ + 2>> "$HOME/var/log/ii/$host" & diff --git a/run/irc.freenode.net b/run/irc.freenode.net @@ -2,14 +2,14 @@ host='irc.freenode.net' -mkdir -p "$VAR/irc/$host" "$LOG/ii" +mkdir -p "$HOME/var/irc/$host" "$HOME/var/log/ii" pgrep -f "ii -s $host" || exec ii \ -s "$host" \ - -i "$VAR/irc" \ + -i "$HOME/var/irc" \ -u "/tmp/$host" \ -n "$NICKii" \ -k "PASS" \ -f "$NAME" \ - 1>> "$VAR/irc/$host/log" \ - 2>> "$LOG/ii/$host" & + 1>> "$HOME/var/irc/$host/log" \ + 2>> "$HOME/var/log/ii/$host" & diff --git a/run/irc.oftc.net b/run/irc.oftc.net @@ -2,14 +2,14 @@ host='irc.oftc.net' -mkdir -p "$VAR/irc/$host" "$LOG/ii" +mkdir -p "$HOME/var/irc/$host" "$HOME/var/log/ii" pgrep -f "ii -s $host" || exec ii \ -s "$host" \ - -i "$VAR/irc" \ + -i "$HOME/var/irc" \ -u "/tmp/$host" \ -n "$NICKii" \ -k "PASS" \ -f "$NAME" \ - 1>> "$VAR/irc/$host/log" \ - 2>> "$LOG/ii/$host" & + 1>> "$HOME/var/irc/$host/log" \ + 2>> "$HOME/var/log/ii/$host" & diff --git a/run/ngircd b/run/ngircd @@ -3,5 +3,5 @@ exec ngircd \ -n \ -f "/etc/ngircd/conf" \ - 1>> "$LOG/ngircd" \ - 2>> "$LOG/ngircd" & + 1>> "$HOME/var/log/ngircd" \ + 2>> "$HOME/var/log/ngircd" & diff --git a/run/opentracker b/run/opentracker @@ -1,6 +1,6 @@ #!/bin/sh -e exec opentracker \ - -d "$VAR/torrent" \ - 1>> "$LOG/opentracker" \ - 2>> "$LOG/opentracker" & + -d "$HOME/var/torrent" \ + 1>> "$HOME/var/log/opentracker" \ + 2>> "$HOME/var/log/opentracker" & diff --git a/run/quark b/run/quark @@ -6,5 +6,5 @@ exec quark \ -h localhost \ -d "$path" \ -V \ - 1>> "$LOG/quark" \ - 2>> "$LOG/quark" & + 1>> "$HOME/var/log/quark" \ + 2>> "$HOME/var/log/quark" & diff --git a/run/ratox b/run/ratox @@ -1,10 +1,10 @@ #!/bin/sh -e -path="${1:-$VAR/ratox}" +path="${1:-$HOME/var/ratox}" mkdir -p "$path" cd "$path" exec ratox \ - 1>> "$LOG/ratox" \ - 2>> "$LOG/ratox" & + 1>> "$HOME/var/log/ratox" \ + 2>> "$HOME/var/log/ratox" & diff --git a/run/ssh-agent b/run/ssh-agent @@ -5,5 +5,5 @@ rm -f "$SSH_AUTH_SOCK" ssh-agent \ -a "$SSH_AUTH_SOCK" \ - 1>> "$LOG/ssh-agent" \ - 2>> "$LOG/ssh-agent" & + 1>> "$HOME/var/log/ssh-agent" \ + 2>> "$HOME/var/log/ssh-agent" & diff --git a/run/tincd b/run/tincd @@ -1,6 +1,6 @@ #!/bin/sh -e -mkdir -p "$RUN" +mkdir -p "$HOME/var/run" exec tincd \ - --logfile="$LOG/tincd" + --logfile="$HOME/var/log/tincd" diff --git a/run/tor b/run/tor @@ -1,5 +1,5 @@ #!/bin/sh -e exec tor \ - 1>> "$LOG/tor" \ - 2>> "$LOG/tor" & + 1>> "$HOME/var/log/tor" \ + 2>> "$HOME/var/log/tor" & diff --git a/run/unix.chat b/run/unix.chat @@ -2,14 +2,14 @@ host='unix.chat' -mkdir -p "$VAR/irc/$host" "$LOG/ii" +mkdir -p "$HOME/var/irc/$host" "$HOME/var/log/ii" pgrep -f "ii -s $host" || exec ii \ -s "$host" \ - -i "$VAR/irc" \ + -i "$HOME/var/irc" \ -u "/tmp/$host" \ -n "$NICKii" \ -k "PASS" \ -f "$NAME" \ - 1>> "$VAR/irc/$host/log" \ - 2>> "$LOG/ii/$host" & + 1>> "$HOME/var/irc/$host/log" \ + 2>> "$HOME/var/log/ii/$host" & diff --git a/skel/collectd.conf b/skel/collectd.conf @@ -1,1819 +0,0 @@ -# -# Config file for collectd(1). -# Please read collectd.conf(5) for a list of options. -# http://collectd.org/ -# - -############################################################################## -# Global # -#----------------------------------------------------------------------------# -# Global settings for the daemon. # -############################################################################## - -#Hostname "localhost" -#FQDNLookup true -#BaseDir "${prefix}/var/lib/collectd" -#PIDFile "${prefix}/var/run/collectd.pid" -#PluginDir "${exec_prefix}/lib/collectd" -#TypesDB "/home/.local/opt/collectd/share/collectd/types.db" - -#----------------------------------------------------------------------------# -# When enabled, plugins are loaded automatically with the default options # -# when an appropriate <Plugin ...> block is encountered. # -# Disabled by default. # -#----------------------------------------------------------------------------# -#AutoLoadPlugin false - -#----------------------------------------------------------------------------# -# When enabled, internal statistics are collected, using "collectd" as the # -# plugin name. # -# Disabled by default. # -#----------------------------------------------------------------------------# -#CollectInternalStats false - -#----------------------------------------------------------------------------# -# Interval at which to query values. This may be overwritten on a per-plugin # -# base by using the 'Interval' option of the LoadPlugin block: # -# <LoadPlugin foo> # -# Interval 60 # -# </LoadPlugin> # -#----------------------------------------------------------------------------# -#Interval 10 - -#MaxReadInterval 86400 -#Timeout 2 -#ReadThreads 5 -#WriteThreads 5 - -# Limit the size of the write queue. Default is no limit. Setting up a limit is -# recommended for servers handling a high volume of traffic. -#WriteQueueLimitHigh 1000000 -#WriteQueueLimitLow 800000 - -############################################################################## -# Logging # -#----------------------------------------------------------------------------# -# Plugins which provide logging functions should be loaded first, so log # -# messages generated when loading or configuring other plugins can be # -# accessed. # -############################################################################## - -LoadPlugin syslog -#LoadPlugin logfile -##LoadPlugin log_logstash - -#<Plugin logfile> -# LogLevel info -# File STDOUT -# Timestamp true -# PrintSeverity false -#</Plugin> - -#<Plugin log_logstash> -# LogLevel info -# File "${prefix}/var/log/collectd.json.log" -#</Plugin> - -#<Plugin syslog> -# LogLevel info -#</Plugin> - -############################################################################## -# LoadPlugin section # -#----------------------------------------------------------------------------# -# Lines beginning with a single `#' belong to plugins which have been built # -# but are disabled by default. # -# # -# Lines beginning with `##' belong to plugins which have not been built due # -# to missing dependencies or because they have been deactivated explicitly. # -############################################################################## - -#LoadPlugin aggregation -##LoadPlugin amqp -#LoadPlugin apache -#LoadPlugin apcups -##LoadPlugin apple_sensors -##LoadPlugin aquaero -#LoadPlugin ascent -##LoadPlugin barometer -##LoadPlugin battery -#LoadPlugin bind -##LoadPlugin ceph -##LoadPlugin cgroups -#LoadPlugin chrony -##LoadPlugin conntrack -##LoadPlugin contextswitch -LoadPlugin cpu -##LoadPlugin cpufreq -##LoadPlugin cpusleep -#LoadPlugin csv -#LoadPlugin curl -##LoadPlugin curl_json -#LoadPlugin curl_xml -##LoadPlugin dbi -#LoadPlugin df -#LoadPlugin disk -##LoadPlugin dns -##LoadPlugin dpdkevents -##LoadPlugin dpdkstat -##LoadPlugin drbd -#LoadPlugin email -##LoadPlugin entropy -##LoadPlugin ethstat -#LoadPlugin exec -##LoadPlugin fhcount -#LoadPlugin filecount -##LoadPlugin fscache -##LoadPlugin gmond -##LoadPlugin gps -##LoadPlugin grpc -#LoadPlugin hddtemp -##LoadPlugin hugepages -##LoadPlugin intel_pmu -##LoadPlugin intel_rdt -LoadPlugin interface -##LoadPlugin ipc -##LoadPlugin ipmi -##LoadPlugin iptables -##LoadPlugin ipvs -##LoadPlugin irq -##LoadPlugin java -LoadPlugin load -##LoadPlugin lpar -##LoadPlugin lua -##LoadPlugin lvm -##LoadPlugin madwifi -#LoadPlugin mbmon -##LoadPlugin mcelog -##LoadPlugin md -##LoadPlugin memcachec -#LoadPlugin memcached -LoadPlugin memory -##LoadPlugin mic -##LoadPlugin modbus -##LoadPlugin mqtt -#LoadPlugin multimeter -##LoadPlugin mysql -##LoadPlugin netapp -##LoadPlugin netlink -LoadPlugin network -##LoadPlugin nfs -#LoadPlugin nginx -#LoadPlugin notify_desktop -##LoadPlugin notify_email -#LoadPlugin notify_nagios -#LoadPlugin ntpd -##LoadPlugin numa -##LoadPlugin nut -#LoadPlugin olsrd -##LoadPlugin onewire -##LoadPlugin openldap -#LoadPlugin openvpn -##LoadPlugin oracle -##LoadPlugin ovs_events -##LoadPlugin ovs_stats -##LoadPlugin perl -##LoadPlugin pinba -##LoadPlugin ping -##LoadPlugin postgresql -#LoadPlugin powerdns -#LoadPlugin processes -##LoadPlugin protocols -##LoadPlugin python -##LoadPlugin redis -##LoadPlugin routeros -##LoadPlugin rrdcached -##LoadPlugin rrdtool -##LoadPlugin sensors -##LoadPlugin serial -##LoadPlugin sigrok -##LoadPlugin smart -##LoadPlugin snmp -##LoadPlugin snmp_agent -#LoadPlugin statsd -#LoadPlugin swap -#LoadPlugin table -#LoadPlugin tail -#LoadPlugin tail_csv -##LoadPlugin tape -#LoadPlugin tcpconns -#LoadPlugin teamspeak2 -#LoadPlugin ted -##LoadPlugin thermal -##LoadPlugin tokyotyrant -##LoadPlugin turbostat -#LoadPlugin unixsock -#LoadPlugin uptime -#LoadPlugin users -#LoadPlugin uuid -##LoadPlugin varnish -##LoadPlugin virt -##LoadPlugin vmem -##LoadPlugin vserver -##LoadPlugin wireless -#LoadPlugin write_graphite -#LoadPlugin write_http -##LoadPlugin write_kafka -#LoadPlugin write_log -##LoadPlugin write_mongodb -##LoadPlugin write_prometheus -##LoadPlugin write_redis -##LoadPlugin write_riemann -#LoadPlugin write_sensu -#LoadPlugin write_tsdb -##LoadPlugin xencpu -##LoadPlugin xmms -##LoadPlugin zfs_arc -##LoadPlugin zone -#LoadPlugin zookeeper - -############################################################################## -# Plugin configuration # -#----------------------------------------------------------------------------# -# In this section configuration stubs for each plugin are provided. A desc- # -# ription of those options is available in the collectd.conf(5) manual page. # -############################################################################## - -#<Plugin aggregation> -# <Aggregation> -# #Host "unspecified" -# Plugin "cpu" -# #PluginInstance "unspecified" -# Type "cpu" -# #TypeInstance "unspecified" -# -# GroupBy "Host" -# GroupBy "TypeInstance" -# -# CalculateNum false -# CalculateSum false -# CalculateAverage true -# CalculateMinimum false -# CalculateMaximum false -# CalculateStddev false -# </Aggregation> -#</Plugin> - -#<Plugin amqp> -# <Publish "name"> -# Host "localhost" -# Port "5672" -# VHost "/" -# User "guest" -# Password "guest" -# Exchange "amq.fanout" -# RoutingKey "collectd" -# Persistent false -# StoreRates false -# ConnectionRetryDelay 0 -# </Publish> -#</Plugin> - -#<Plugin apache> -# <Instance "local"> -# URL "http://localhost/status?auto" -# User "www-user" -# Password "secret" -# CACert "/etc/ssl/ca.crt" -# </Instance> -#</Plugin> - -#<Plugin apcups> -# Host "localhost" -# Port "3551" -# ReportSeconds true -# PersistentConnection true -#</Plugin> - -#<Plugin aquaero> -# Device "" -#</Plugin> - -#<Plugin ascent> -# URL "http://localhost/ascent/status/" -# User "www-user" -# Password "secret" -# CACert "/etc/ssl/ca.crt" -#</Plugin> - -#<Plugin "barometer"> -# Device "/dev/i2c-0"; -# Oversampling 512 -# PressureOffset 0.0 -# TemperatureOffset 0.0 -# Normalization 2 -# Altitude 238.0 -# TemperatureSensor "myserver/onewire-F10FCA000800/temperature" -#</Plugin> - -#<Plugin "battery"> -# ValuesPercentage false -# ReportDegraded false -# QueryStateFS false -#</Plugin> - -#<Plugin "bind"> -# URL "http://localhost:8053/" -# ParseTime false -# OpCodes true -# QTypes true -# -# ServerStats true -# ZoneMaintStats true -# ResolverStats false -# MemoryStats true -# -# <View "_default"> -# QTypes true -# ResolverStats true -# CacheRRSets true -# -# Zone "127.in-addr.arpa/IN" -# </View> -#</Plugin> - -#<Plugin ceph> -# LongRunAvgLatency false -# ConvertSpecialMetricTypes true -# <Daemon "osd.0"> -# SocketPath "/var/run/ceph/ceph-osd.0.asok" -# </Daemon> -# <Daemon "osd.1"> -# SocketPath "/var/run/ceph/ceph-osd.1.asok" -# </Daemon> -# <Daemon "mon.a"> -# SocketPath "/var/run/ceph/ceph-mon.ceph1.asok" -# </Daemon> -# <Daemon "mds.a"> -# SocketPath "/var/run/ceph/ceph-mds.ceph1.asok" -# </Daemon> -#</Plugin> - -#<Plugin chrony> -# Host "localhost" -# Port "323" -# Timeout "2" -#</Plugin> - -#<Plugin cgroups> -# CGroup "libvirt" -# IgnoreSelected false -#</Plugin> - -#<Plugin cpu> -# ReportByCpu true -# ReportByState true -# ValuesPercentage false -# ReportNumCpu false -# ReportGuestState false -# SubtractGuestState true -#</Plugin> -# -#<Plugin csv> -# DataDir "${prefix}/var/lib/collectd/csv" -# StoreRates false -#</Plugin> - -#<Plugin curl> -# <Page "stock_quotes"> -# URL "http://finance.google.com/finance?q=NYSE%3AAMD" -# User "foo" -# Password "bar" -# Digest false -# VerifyPeer true -# VerifyHost true -# CACert "/path/to/ca.crt" -# Header "X-Custom-Header: foobar" -# Post "foo=bar" -# -# MeasureResponseTime false -# MeasureResponseCode false -# <Match> -# Regex "<span +class=\"pr\"[^>]*> *([0-9]*\\.[0-9]+) *</span>" -# DSType "GaugeAverage" -# Type "stock_value" -# Instance "AMD" -# </Match> -# </Page> -#</Plugin> - -#<Plugin curl_json> -# <URL "http://localhost:80/test.json"> -# Instance "test_http_json" -# <Key "testArray/0"> -# Type "gauge" -# # Expect: 1 -# </Key> -# <Key "testArray/1"> -# Type "gauge" -# # Expect: 2 -# </Key> -# <Key "testArrayInbetween/0/blarg"> -# Type "gauge" -# # Expect: 3 -# </Key> -# <Key "testArrayInbetween/1/blub"> -# Type "gauge" -# # Expect: 4 -# </Key> -# <Key "testDirectHit"> -# Type "gauge" -# # Expect: 5 -# </Key> -# <Key "testSubLevelHit/oneMoreLevel"> -# Type "gauge" -# # Expect: 6 -# </Key> -# </URL> -# put this as test.json on your webserver, the above config demonstraces -# how to match them. -# { -# "testArray":[1,2], -# "testArrayInbetween":[{"blarg":3},{"blub":4}], -# "testDirectHit":5, -# "testSubLevelHit":{"oneMoreLevel":6} -# } -## See: http://wiki.apache.org/couchdb/Runtime_Statistics -# <URL "http://localhost:5984/_stats"> -# Instance "httpd" -# <Key "httpd/requests/count"> -# Type "http_requests" -# </Key> -# -# <Key "httpd_request_methods/*/count"> -# Type "http_request_methods" -# </Key> -# -# <Key "httpd_status_codes/*/count"> -# Type "http_response_codes" -# </Key> -# </URL> -## Database status metrics: -# <URL "http://localhost:5984/_all_dbs"> -# Instance "dbs" -# <Key "*/doc_count"> -# Type "gauge" -# </Key> -# <Key "*/doc_del_count"> -# Type "counter" -# </Key> -# <Key "*/disk_size"> -# Type "bytes" -# </Key> -# </URL> -#</Plugin> - -#<Plugin curl_xml> -# <URL "http://localhost/stats.xml"> -# Host "my_host" -# #Plugin "stats" -# Instance "some_instance" -# User "collectd" -# Password "thaiNg0I" -# Digest false -# VerifyPeer true -# VerifyHost true -# CACert "/path/to/ca.crt" -# Header "X-Custom-Header: foobar" -# Post "foo=bar" -# -# <XPath "table[@id=\"magic_level\"]/tr"> -# Type "magic_level" -# #InstancePrefix "prefix-" -# InstanceFrom "td[1]" -# #PluginInstanceFrom "td[1]" -# ValuesFrom "td[2]/span[@class=\"level\"]" -# </XPath> -# </URL> -#</Plugin> - -#<Plugin dbi> -# <Query "num_of_customers"> -# Statement "SELECT 'customers' AS c_key, COUNT(*) AS c_value FROM customers_tbl" -# <Result> -# Type "gauge" -# InstancesFrom "c_key" -# ValuesFrom "c_value" -# </Result> -# </Query> -# <Database "customers_db"> -# #Plugin "mycompany" -# Driver "mysql" -# DriverOption "host" "localhost" -# DriverOption "username" "collectd" -# DriverOption "password" "AeXohy0O" -# DriverOption "dbname" "custdb0" -# #SelectDB "custdb0" -# Query "num_of_customers" -# #Query "..." -# #Host "..." -# </Database> -#</Plugin> - -#<Plugin df> -# Device "/dev/hda1" -# Device "192.168.0.2:/mnt/nfs" -# MountPoint "/home" -# FSType "ext3" -# IgnoreSelected false -# ReportByDevice false -# ReportInodes false -# ValuesAbsolute true -# ValuesPercentage false -#</Plugin> - -#<Plugin disk> -# Disk "/^[hs]d[a-f][0-9]?$/" -# IgnoreSelected false -# UseBSDName false -# UdevNameAttr "DEVNAME" -#</Plugin> - -#<Plugin dns> -# Interface "eth0" -# IgnoreSource "192.168.0.1" -# SelectNumericQueryTypes true -#</Plugin> - -#<Plugin "dpdkevents"> -# <EAL> -# Coremask "0x1" -# MemoryChannels "4" -# FilePrefix "rte" -# </EAL> -# <Event "link_status"> -# SendEventsOnUpdate true -# EnabledPortMask 0xffff -# PortName "interface1" -# PortName "interface2" -# SendNotification false -# </Event> -# <Event "keep_alive"> -# SendEventsOnUpdate true -# LCoreMask "0xf" -# KeepAliveShmName "/dpdk_keepalive_shm_name" -# SendNotification false -# </Event> -#</Plugin> - -#<Plugin dpdkstat> -# <EAL> -# Coremask "0x2" -# MemoryChannels "4" -# FilePrefix "rte" -# LogLevel "7" -# RteDriverLibPath "/usr/lib/dpdk-pmd" -# </EAL> -# SharedMemObj "dpdk_collectd_stats_0" -# EnabledPortMask 0xffff -# PortName "interface1" -# PortName "interface2" -#</Plugin> - -#<Plugin email> -# SocketFile "${prefix}/var/run/collectd-email" -# SocketGroup "collectd" -# SocketPerms "0770" -# MaxConns 5 -#</Plugin> - -#<Plugin ethstat> -# Interface "eth0" -# Map "rx_csum_offload_errors" "if_rx_errors" "checksum_offload" -# Map "multicast" "if_multicast" -# MappedOnly false -#</Plugin> - -#<Plugin exec> -# Exec "user:group" "/path/to/exec" -# NotificationExec "user:group" "/path/to/exec" -#</Plugin> - -#<Plugin fhcount> -# ValuesAbsolute true -# ValuesPercentage false -#</Plugin> - -#<Plugin filecount> -# <Directory "/path/to/dir"> -# #Plugin "foo" -# Instance "foodir" -# Name "*.conf" -# MTime "-5m" -# Size "+10k" -# Recursive true -# IncludeHidden false -# RegularOnly true -# #FilesSizeType "bytes" -# #FilesCountType "files" -# #TypeInstance "instance" -# </Directory> -#</Plugin> - -#<Plugin gmond> -# MCReceiveFrom "239.2.11.71" "8649" -# <Metric "swap_total"> -# Type "swap" -# TypeInstance "total" -# DataSource "value" -# </Metric> -# <Metric "swap_free"> -# Type "swap" -# TypeInstance "free" -# DataSource "value" -# </Metric> -#</Plugin> - -#<Plugin gps> -# Host "127.0.0.1" -# Port "2947" -# Timeout 0.015 -# PauseConnect 5 -#</Plugin> - -#<Plugin grpc> -# <Server "example.com" "50051"> -# EnableSSL true -# SSLCACertificateFile "/path/to/root.pem" -# SSLCertificateFile "/path/to/server.pem" -# SSLCertificateKeyFile "/path/to/server.key" -# </Server> -# <Listen "0.0.0.0" "50051"> -# EnableSSL true -# SSLCACertificateFile "/path/to/root.pem" -# SSLCertificateFile "/path/to/client.pem" -# SSLCertificateKeyFile "/path/to/client.key" -# </Listen> -#</Plugin> - -#<Plugin hddtemp> -# Host "127.0.0.1" -# Port "7634" -#</Plugin> - -#<Plugin hugepages> -# ReportPerNodeHP true -# ReportRootHP true -# ValuesPages true -# ValuesBytes false -# ValuesPercentage false -#</Plugin> - -#<Plugin intel_pmu> -# ReportHardwareCacheEvents true -# ReportKernelPMUEvents true -# ReportSoftwareEvents true -# EventList "/var/cache/pmu/GenuineIntel-6-2D-core.json" -# HardwareEvents "L2_RQSTS.CODE_RD_HIT,L2_RQSTS.CODE_RD_MISS" "L2_RQSTS.ALL_CODE_RD" -#</Plugin> - -#<Plugin "intel_rdt"> -# Cores "0-2" -#</Plugin> - -#<Plugin interface> -# Interface "eth0" -# IgnoreSelected false -# ReportInactive true -# UniqueName false -#</Plugin> - -#<Plugin ipmi> -# <Instance "local"> -# Sensor "some_sensor" -# Sensor "another_one" -# IgnoreSelected false -# NotifySensorAdd false -# NotifySensorRemove true -# NotifySensorNotPresent false -# NotifyIPMIConnectionState false -# SELEnabled false -# SELClearEvent false -# </Instance> -# <Instance "remote"> -# Host "server.example.com" -# Address "1.2.3.4" -# Username "user" -# Password "secret" -# #AuthType "md5" -# Sensor "some_sensor" -# Sensor "another_one" -# IgnoreSelected false -# NotifySensorAdd false -# NotifySensorRemove true -# NotifySensorNotPresent false -# NotifyIPMIConnectionState false -# SELEnabled false -# SELClearEvent false -# </Instance> -#</Plugin> - -#<Plugin iptables> -# Chain table chain -# Chain6 table chain -#</Plugin> - -#<Plugin irq> -# Irq 7 -# Irq 8 -# Irq 9 -# IgnoreSelected true -#</Plugin> - -#<Plugin java> -# JVMArg "-verbose:jni" -# JVMArg "-Djava.class.path=/home/.local/opt/collectd/share/collectd/java/collectd-api.jar" -# -# LoadPlugin "org.collectd.java.Foobar" -# <Plugin "org.collectd.java.Foobar"> -# # To be parsed by the plugin -# </Plugin> -#</Plugin> - -#<Plugin load> -# ReportRelative true -#</Plugin> - -#<Plugin lpar> -# CpuPoolStats false -# ReportBySerial false -#</Plugin> - -#<Plugin lua> -# BasePath "/home/.local/opt/collectd/share/collectd/lua" -# Script "script1.lua" -# Script "script2.lua" -#</Plugin> - -#<Plugin madwifi> -# Interface "wlan0" -# IgnoreSelected false -# Source "SysFS" -# WatchSet "None" -# WatchAdd "node_octets" -# WatchAdd "node_rssi" -# WatchAdd "is_rx_acl" -# WatchAdd "is_scan_active" -#</Plugin> - -#<Plugin mbmon> -# Host "127.0.0.1" -# Port "411" -#</Plugin> - -#<Plugin mcelog> -# <Memory> -# McelogClientSocket "/var/run/mcelog-client" -# PersistentNotification false -# </Memory> -# McelogLogfile "/var/log/mcelog" -#</Plugin> - -#<Plugin md> -# Device "/dev/md0" -# IgnoreSelected false -#</Plugin> - -#<Plugin memcachec> -# <Page "plugin_instance"> -# Server "localhost" -# Key "page_key" -# <Match> -# Regex "(\\d+) bytes sent" -# ExcludeRegex "<lines to be excluded>" -# DSType CounterAdd -# Type "ipt_octets" -# Instance "type_instance" -# </Match> -# </Page> -#</Plugin> - -#<Plugin memcached> -# <Instance "local"> -# #Host "memcache.example.com" -# Address "127.0.0.1" -# Port "11211" -# </Instance> -#</Plugin> - -#<Plugin memory> -# ValuesAbsolute true -# ValuesPercentage false -#</Plugin> - -#<Plugin modbus> -# <Data "data_name"> -# RegisterBase 1234 -# RegisterCmd ReadHolding -# RegisterType float -# Type gauge -# Instance "..." -# </Data> -# -# <Host "name"> -# Address "addr" -# Port "1234" -# Interval 60 -# -# <Slave 1> -# Instance "foobar" # optional -# Collect "data_name" -# </Slave> -# </Host> -#</Plugin> - -#<Plugin mqtt> -# <Publish "name"> -# Host "localhost" -# Port 1883 -# ClientId "localhost" -# User "user" -# Password "secret" -# QoS 0 -# Prefix "collectd" -# StoreRates true -# Retain false -# CACert "/etc/ssl/ca.crt" -# CertificateFile "/etc/ssl/client.crt" -# CertificateKeyFile "/etc/ssl/client.pem" -# TLSProtocol "tlsv1.2" -# CipherSuite "ciphers" -# </Publish> -# <Subscribe "name"> -# Host "localhost" -# Port 1883 -# ClientId "localhost" -# User "user" -# Password "secret" -# QoS 2 -# Topic "collectd/#" -# CleanSession true -# CACert "/etc/ssl/ca.crt" -# CertificateFile "/etc/ssl/client.crt" -# CertificateKeyFile "/etc/ssl/client.pem" -# TLSProtocol "tlsv1.2" -# CipherSuite "ciphers" -# </Subscribe> -#</Plugin> - -#<Plugin mysql> -# <Database db_name> -# Host "database.serv.er" -# User "db_user" -# Password "secret" -# Database "db_name" -# SSLKey "/path/to/key.pem" -# SSLCert "/path/to/cert.pem" -# SSLCA "/path/to/ca.pem" -# SSLCAPath "/path/to/cas/" -# SSLCipher "DHE-RSA-AES256-SHA" -# MasterStats true -# ConnectTimeout 10 -# InnodbStats true -# </Database> -# -# <Database db_name2> -# Alias "squeeze" -# Host "localhost" -# Socket "/var/run/mysql/mysqld.sock" -# SlaveStats true -# SlaveNotifications true -# </Database> -# <Database galera> -# Alias "galera" -# Host "localhost" -# Socket "/var/run/mysql/mysqld.sock" -# WsrepStats true -# </Database> -#</Plugin> - -#<Plugin netapp> -# <Host "netapp1.example.com"> -# Protocol "https" -# Address "10.0.0.1" -# Port 443 -# User "username" -# Password "aef4Aebe" -# Interval 30 -# -# <WAFL> -# Interval 30 -# GetNameCache true -# GetDirCache true -# GetBufferCache true -# GetInodeCache true -# </WAFL> -# -# <Disks> -# Interval 30 -# GetBusy true -# </Disks> -# -# <VolumePerf> -# Interval 30 -# GetIO "volume0" -# IgnoreSelectedIO false -# GetOps "volume0" -# IgnoreSelectedOps false -# GetLatency "volume0" -# IgnoreSelectedLatency false -# </VolumePerf> -# -# <VolumeUsage> -# Interval 30 -# GetCapacity "vol0" -# GetCapacity "vol1" -# IgnoreSelectedCapacity false -# GetSnapshot "vol1" -# GetSnapshot "vol3" -# IgnoreSelectedSnapshot false -# </VolumeUsage> -# -# <System> -# Interval 30 -# GetCPULoad true -# GetInterfaces true -# GetDiskOps true -# GetDiskIO true -# </System> -# </Host> -#</Plugin> - -#<Plugin netlink> -# Interface "All" -# VerboseInterface "All" -# QDisc "eth0" "pfifo_fast-1:0" -# Class "ppp0" "htb-1:10" -# Filter "ppp0" "u32-1:0" -# IgnoreSelected false -#</Plugin> - -<Plugin network> -# # client setup: - Server "ff18::efc0:4a42" "25826" - <Server "239.192.74.66" "25826"> -# SecurityLevel Encrypt -# Username "user" -# Password "secret" -# Interface "eth0" -# ResolveInterval 14400 - </Server> -# TimeToLive 128 -# -# # server setup: -# Listen "ff18::efc0:4a42" "25826" -# <Listen "239.192.74.66" "25826"> -# SecurityLevel Sign -# AuthFile "/etc/collectd/passwd" -# Interface "eth0" -# </Listen> -# MaxPacketSize 1452 -# -# # proxy setup (client and server as above): -# Forward true -# -# # statistics about the network plugin itself -# ReportStats false -# -# # "garbage collection" -# CacheFlush 1800 -</Plugin> - -#<Plugin nfs> -# ReportV2 false -# #ReportV3 false -# #ReportV4 false -#</Plugin> - -#<Plugin nginx> -# URL "http://localhost/status?auto" -# User "www-user" -# Password "secret" -# CACert "/etc/ssl/ca.crt" -#</Plugin> - -#<Plugin notify_desktop> -# OkayTimeout 1000 -# WarningTimeout 5000 -# FailureTimeout 0 -#</Plugin> - -#<Plugin notify_email> -# SMTPServer "localhost" -# SMTPPort 25 -# SMTPUser "my-username" -# SMTPPassword "my-password" -# From "collectd@main0server.com" -# # <WARNING/FAILURE/OK> on <hostname>. beware! do not use not more than two %s in this string!!! -# Subject "Aaaaaa!! %s on %s!!!!!" -# Recipient "email1@domain1.net" -# Recipient "email2@domain2.com" -#</Plugin> - -#<Plugin notify_nagios> -# CommandFile "/usr/local/nagios/var/rw/nagios.cmd" -#</Plugin> - -#<Plugin ntpd> -# Host "localhost" -# Port 123 -# ReverseLookups false -# IncludeUnitID true -#</Plugin> - -#<Plugin nut> -# UPS "upsname@hostname:port" -# ForceSSL true -# VerifyPeer true -# CAPath "/path/to/folder" -# #ConnectTimeout 5000 -#</Plugin> - -#<Plugin olsrd> -# Host "127.0.0.1" -# Port "2006" -# CollectLinks "Summary" -# CollectRoutes "Summary" -# CollectTopology "Summary" -#</Plugin> - -#<Plugin onewire> -# Device "-s localhost:4304" -# Sensor "F10FCA000800" -# IgnoreSelected false -#</Plugin> - -#<Plugin openldap> -# <Instance "localhost"> -# URL "ldap://localhost:389" -# StartTLS false -# VerifyHost true -# CACert "/path/to/ca.crt" -# Timeout -1 -# Version 3 -# </Instance> -#</Plugin> - -#<Plugin openvpn> -# StatusFile "/etc/openvpn/openvpn-status.log" -# ImprovedNamingSchema false -# CollectCompression true -# CollectIndividualUsers true -# CollectUserCount false -#</Plugin> - -#<Plugin oracle> -# <Query "out_of_stock"> -# Statement "SELECT category, COUNT(*) AS value FROM products WHERE in_stock = 0 GROUP BY category" -# <Result> -# Type "gauge" -# InstancesFrom "category" -# ValuesFrom "value" -# </Result> -# </Query> -# <Database "product_information"> -# #Plugin "warehouse" -# ConnectID "db01" -# Username "oracle" -# Password "secret" -# Query "out_of_stock" -# </Database> -#</Plugin> - -#<Plugin ovs_events> -# Port "6640" -# Address "127.0.0.1" -# Socket "/var/run/openvswitch/db.sock" -# Interfaces "br0" "veth0" -# SendNotification true -# DispatchValues false -#</Plugin> - -#<Plugin ovs_stats> -# Port "6640" -# Address "127.0.0.1" -# Socket "/var/run/openvswitch/db.sock" -# Bridges "br0" "br_ext" -#</Plugin> - -#<Plugin perl> -# IncludeDir "/my/include/path" -# BaseName "Collectd::Plugins" -# EnableDebugger "" -# LoadPlugin Monitorus -# LoadPlugin OpenVZ -# -# <Plugin foo> -# Foo "Bar" -# Qux "Baz" -# </Plugin> -#</Plugin> - -#<Plugin pinba> -# Address "::0" -# Port "30002" -# <View "name"> -# Host "host name" -# Server "server name" -# Script "script name" -# </View> -#</Plugin> - -#<Plugin ping> -# Host "host.foo.bar" -# Interval 1.0 -# Timeout 0.9 -# TTL 255 -# SourceAddress "1.2.3.4" -# Device "eth0" -# MaxMissed -1 -#</Plugin> - -#<Plugin postgresql> -# <Query magic> -# Statement "SELECT magic FROM wizard WHERE host = $1;" -# Param hostname -# <Result> -# Type gauge -# InstancePrefix "magic" -# ValuesFrom magic -# </Result> -# </Query> -# <Query rt36_tickets> -# Statement "SELECT COUNT(type) AS count, type \ -# FROM (SELECT CASE \ -# WHEN resolved = 'epoch' THEN 'open' \ -# ELSE 'resolved' END AS type \ -# FROM tickets) type \ -# GROUP BY type;" -# <Result> -# Type counter -# InstancePrefix "rt36_tickets" -# InstancesFrom "type" -# ValuesFrom "count" -# </Result> -# </Query> -# <Writer sqlstore> -# # See contrib/postgresql/collectd_insert.sql for details -# Statement "SELECT collectd_insert($1, $2, $3, $4, $5, $6, $7, $8, $9);" -# StoreRates true -# </Writer> -# <Database foo> -# #Plugin "kingdom" -# Host "hostname" -# Port "5432" -# User "username" -# Password "secret" -# SSLMode "prefer" -# KRBSrvName "kerberos_service_name" -# Query magic -# </Database> -# <Database bar> -# Interval 60 -# Service "service_name" -# Query backends # predefined -# Query rt36_tickets -# </Database> -# <Database qux> -# Service "collectd_store" -# Writer sqlstore -# # see collectd.conf(5) for details -# CommitInterval 30 -# </Database> -#</Plugin> - -#<Plugin powerdns> -# <Server "server_name"> -# Collect "latency" -# Collect "udp-answers" "udp-queries" -# Socket "/var/run/pdns.controlsocket" -# </Server> -# <Recursor "recursor_name"> -# Collect "questions" -# Collect "cache-hits" "cache-misses" -# Socket "/var/run/pdns_recursor.controlsocket" -# </Recursor> -# LocalSocket "/opt/collectd/var/run/collectd-powerdns" -#</Plugin> - -#<Plugin processes> -# CollectFileDescriptor true -# CollectContextSwitch true -# CollectMemoryMaps true -# Process "name" -# ProcessMatch "name" "regex" -# <Process "collectd"> -# CollectFileDescriptor false -# CollectContextSwitch false -# </Process> -# <ProcessMatch "name" "regex"> -# CollectFileDescriptor false -# CollectContextSwitch true -# </Process> -#</Plugin> - -#<Plugin protocols> -# Value "/^Tcp:/" -# IgnoreSelected false -#</Plugin> - -#<Plugin python> -# ModulePath "/path/to/your/python/modules" -# LogTraces true -# Interactive true -# Import "spam" -# -# <Module spam> -# spam "wonderful" "lovely" -# </Module> -#</Plugin> - -#<Plugin redis> -# <Node example> -# Host "redis.example.com" -# Port "6379" -# Timeout 2000 -# </Node> -#</Plugin> - -#<Plugin routeros> -# <Router> -# Host "router.example.com" -# Port "8728" -# User "admin" -# Password "dozaiTh4" -# CollectInterface true -# CollectRegistrationTable true -# CollectCPULoad true -# CollectMemory true -# CollectDF true -# CollectDisk true -# </Router> -#</Plugin> - -#<Plugin rrdcached> -# DaemonAddress "unix:/tmp/rrdcached.sock" -# DataDir "${prefix}/var/lib/collectd/rrd" -# CreateFiles true -# CreateFilesAsync false -# CollectStatistics true -#</Plugin> - -#<Plugin rrdtool> -# DataDir "${prefix}/var/lib/collectd/rrd" -# CreateFilesAsync false -# CacheTimeout 120 -# CacheFlush 900 -# WritesPerSecond 50 -#</Plugin> - -#<Plugin sensors> -# SensorConfigFile "/etc/sensors.conf" -# Sensor "it8712-isa-0290/temperature-temp1" -# Sensor "it8712-isa-0290/fanspeed-fan3" -# Sensor "it8712-isa-0290/voltage-in8" -# IgnoreSelected false -#</Plugin> - -#<Plugin sigrok> -# LogLevel 3 -# <Device "AC Voltage"> -# Driver "fluke-dmm" -# MinimumInterval 10 -# Conn "/dev/ttyUSB2" -# </Device> -# <Device "Sound Level"> -# Driver "cem-dt-885x" -# Conn "/dev/ttyUSB1" -# </Device> -#</Plugin> - -#<Plugin smart> -# Disk "/^[hs]d[a-f][0-9]?$/" -# IgnoreSelected false -#</Plugin> - -#<Plugin snmp> -# <Data "powerplus_voltge_input"> -# Type "voltage" -# Table false -# Instance "input_line1" -# Values "SNMPv2-SMI::enterprises.6050.5.4.1.1.2.1" -# </Data> -# <Data "hr_users"> -# Type "users" -# Table false -# Instance "" -# Values "HOST-RESOURCES-MIB::hrSystemNumUsers.0" -# </Data> -# <Data "std_traffic"> -# Type "if_octets" -# Table true -# Instance "IF-MIB::ifDescr" -# Values "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets" -# </Data> -# -# <Host "some.switch.mydomain.org"> -# Address "192.168.0.2" -# Version 1 -# Community "community_string" -# Collect "std_traffic" -# Interval 120 -# Timeout 10 -# Retries 1 -# </Host> -# <Host "some.server.mydomain.org"> -# Address "192.168.0.42" -# Version 2 -# Community "another_string" -# Collect "std_traffic" "hr_users" -# </Host> -# <Host "some.ups.mydomain.org"> -# Address "192.168.0.3" -# Version 1 -# Community "more_communities" -# Collect "powerplus_voltge_input" -# Interval 300 -# Timeout 5 -# Retries 5 -# </Host> -#</Plugin> - -#<Plugin snmp_agent> -# <Data "memAvailReal"> -# Plugin "memory" -# Type "memory" -# TypeInstance "free" -# OIDs "1.3.6.1.4.1.2021.4.6.0" -# </Data> -# <Table "ifTable"> -# IndexOID "IF-MIB::ifIndex" -# SizeOID "IF-MIB::ifNumber" -# <Data "ifDescr"> -# Instance true -# Plugin "interface" -# OIDs "IF-MIB::ifDescr" -# </Data> -# <Data "ifOctets"> -# Plugin "interface" -# Type "if_octets" -# TypeInstance "" -# OIDs "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets" -# </Data> -# </Table> -#</Plugin> - -#<Plugin statsd> -# Host "::" -# Port "8125" -# DeleteCounters false -# DeleteTimers false -# DeleteGauges false -# DeleteSets false -# CounterSum false -# TimerPercentile 90.0 -# TimerPercentile 95.0 -# TimerPercentile 99.0 -# TimerLower false -# TimerUpper false -# TimerSum false -# TimerCount false -#</Plugin> - -#<Plugin swap> -# ReportByDevice false -# ReportBytes true -# ValuesAbsolute true -# ValuesPercentage false -# ReportIO true -#</Plugin> - -#<Plugin table> -# <Table "/proc/slabinfo"> -# #Plugin "table" -# Instance "slabinfo" -# Separator " " -# <Result> -# Type gauge -# InstancePrefix "active_objs" -# InstancesFrom 0 -# ValuesFrom 1 -# </Result> -# <Result> -# Type gauge -# InstancePrefix "objperslab" -# InstancesFrom 0 -# ValuesFrom 4 -# </Result> -# </Table> -#</Plugin> - -#<Plugin tail> -# <File "/var/log/exim4/mainlog"> -# Instance "exim" -# Interval 60 -# <Match> -# Regex "S=([1-9][0-9]*)" -# DSType "CounterAdd" -# Type "ipt_bytes" -# Instance "total" -# </Match> -# <Match> -# Regex "\\<R=local_user\\>" -# ExcludeRegex "\\<R=local_user\\>.*mail_spool defer" -# DSType "CounterInc" -# Type "counter" -# Instance "local_user" -# </Match> -# </File> -# <File "/var/log/nginx/apache-time.log"> -# #Use the following log format in nginx: -# #log_format response_time '[$host] "$upstream_response_time" ...' -# Instance "apache" -# <Match> -# Regex "^\\S+ \"([0-9.]+)\"" -# <DSType Distribution> -# Percentile 80 # -> latency-foo-80 -# Percentile 95 # -> latency-foo-95 -# Percentile 99 # -> latency-foo-99 -# Bucket 0 0.1 # -> bucket-latency-foo-0_0.1 -# Bucket 0.1 0.2 # -> bucket-latency-foo-0.1_0.2 -# Bucket 0.2 0.5 # -> bucket-latency-foo-0.2_0.5 -# Bucket 0.5 1.0 # -> bucket-latency-foo-0.5_1 -# Bucket 1.0 2.0 # -> bucket-latency-foo-1_2 -# Bucket 2.0 0 # -> bucket-latency-foo-2_inf -# #BucketType "bucket" -# </DSType> -# Type "latency" -# Instance "foo" -# </Match> -# </File> -#</Plugin> - -#<Plugin tail_csv> -# <Metric "dropped"> -# Type "percent" -# Instance "dropped" -# ValueFrom 1 -# </Metric> -# <Metric "mbps"> -# Type "bytes" -# Instance "wire-realtime" -# ValueFrom 2 -# </Metric> -# <Metric "alerts"> -# Type "alerts_per_second" -# ValueFrom 3 -# </Metric> -# <Metric "kpps"> -# Type "kpackets_wire_per_sec.realtime" -# ValueFrom 4 -# </Metric> -# <File "/var/log/snort/snort.stats"> -# Instance "snort-eth0" -# Interval 600 -# Collect "dropped" "mbps" "alerts" "kpps" -# TimeFrom 0 -# </File> -#</Plugin> - -#<Plugin tcpconns> -# ListeningPorts false -# AllPortsSummary false -# LocalPort "25" -# RemotePort "25" -#</Plugin> - -#<Plugin teamspeak2> -# Host "127.0.0.1" -# Port "51234" -# Server "8767" -#</Plugin> - -#<Plugin ted> -# Device "/dev/ttyUSB0" -# Retries 0 -#</Plugin> - -#<Plugin thermal> -# ForceUseProcfs false -# Device "THRM" -# IgnoreSelected false -#</Plugin> - -#<Plugin tokyotyrant> -# Host "localhost" -# Port "1978" -#</Plugin> - -#<Plugin turbostat> -## None of the following option should be set manually -## This plugin automatically detect most optimal options -## Only set values here if: -## - The module asks you to -## - You want to disable the collection of some data -## - Your (Intel) CPU is not supported (yet) by the module -## - The module generates a lot of errors 'MSR offset 0x... read failed' -## In the last two cases, please open a bug request -# -# TCCActivationTemp "100" -# CoreCstates "392" -# PackageCstates "396" -# SystemManagementInterrupt true -# DigitalTemperatureSensor true -# PackageThermalManagement true -# RunningAveragePowerLimit "7" -#</Plugin> - -#<Plugin unixsock> -# SocketFile "/home/.local/opt/collectd/var/run/collectd-unixsock" -# SocketGroup "collectd" -# SocketPerms "0660" -# DeleteSocket false -#</Plugin> - -#<Plugin uuid> -# UUIDFile "/etc/uuid" -#</Plugin> - -#<Plugin mic> -# ShowCPU true -# ShowCPUCores true -# ShowMemory true -# ShowTemperatures true -## Temperature Sensors can be ignored/shown by repeated #Temperature lines, and -## then inverted with a IgnoreSelectedTemperature. -## Known Temperature sensors: die, devmem, fin, fout, vccp, vddg, vddq -# Temperature vddg -# IgnoreSelectedTemperature true -# ShowPower true -## Power Sensors can be ignored/shown by repeated #Power lines, and -## then inverted with a IgnoreSelectedTemperature. -## Known Temperature sensors: total0, total1, inst, imax, pci3, c2x3, c2x4, vccp, vddg, vddq -# Power total1 -# IgnoreSelectedPower true -#</Plugin> - -#<Plugin varnish> -# This tag support an argument if you want to -# monitor the local instance just use </Instance> -# If you prefer defining another instance you can do -# so by using <Instance "myinstance"> -# <Instance> -# CollectBackend true -# CollectBan false # Varnish 3 and above -# CollectCache true -# CollectConnections true -# CollectDirectorDNS false # Varnish 3 only -# CollectESI false -# CollectFetch false -# CollectHCB false -# CollectObjects false -# CollectPurge false # Varnish 2 only -# CollectSession false -# CollectSHM true -# CollectSMA false # Varnish 2 & 4 only -# CollectSMS false -# CollectSM false # Varnish 2 only -# CollectStruct false -# CollectTotals false -# CollectUptime false # Varnish 3 and above -# CollectVCL false -# CollectVSM false # Varnish 4 only -# CollectWorkers false -# CollectLock false # Varnish 4 only -# CollectMempool false # Varnish 4 only -# CollectManagement false # Varnish 4 only -# CollectSMF false # Varnish 4 only -# CollectVBE false # Varnish 4 only -# CollectMSE false # Varnish-Plus 4 only -# </Instance> -#</Plugin> - -#<Plugin virt> -# Connection "xen:///" -# RefreshInterval 60 -# Domain "name" -# BlockDevice "name:device" -# BlockDeviceFormat target -# BlockDeviceFormatBasename false -# InterfaceDevice "name:device" -# IgnoreSelected false -# HostnameFormat name -# InterfaceFormat name -# PluginInstanceFormat name -# Instances 1 -# ExtraStats "cpu_util disk disk_err domain_state fs_info job_stats_background pcpu perf vcpupin" -#</Plugin> - -#<Plugin vmem> -# Verbose false -#</Plugin> - -#<Plugin write_graphite> -# <Node "example"> -# Host "localhost" -# Port "2003" -# Protocol "tcp" -# ReconnectInterval 0 -# LogSendErrors true -# Prefix "collectd" -# Postfix "collectd" -# StoreRates true -# AlwaysAppendDS false -# EscapeCharacter "_" -# SeparateInstances false -# PreserveSeparator false -# DropDuplicateFields false -# </Node> -#</Plugin> - -#<Plugin write_http> -# <Node "example"> -# URL "http://example.com/collectd-post" -# User "collectd" -# Password "weCh3ik0" -# VerifyPeer true -# VerifyHost true -# CACert "/etc/ssl/ca.crt" -# CAPath "/etc/ssl/certs/" -# ClientKey "/etc/ssl/client.pem" -# ClientCert "/etc/ssl/client.crt" -# ClientKeyPass "secret" -# Header "X-Custom-Header: custom_value" -# SSLVersion "TLSv1" -# Format "Command" -# Prefix "collectd" # metric prefix, only available for KAIROSDB format -# Attribute "key" "value" # only available for KAIROSDB format -# TTL 0 # data ttl, only available for KAIROSDB format -# Metrics true -# Notifications false -# StoreRates false -# BufferSize 4096 -# LowSpeedLimit 0 -# Timeout 0 -# </Node> -#</Plugin> - -#<Plugin write_kafka> -# Property "metadata.broker.list" "localhost:9092" -# <Topic "collectd"> -# Format JSON -# </Topic> -#</Plugin> - -#<Plugin write_mongodb> -# <Node "example"> -# Host "localhost" -# Port "27017" -# Timeout 1000 -# StoreRates false -# Database "auth_db" -# User "auth_user" -# Password "auth_passwd" -# </Node> -#</Plugin> - -#<Plugin write_prometheus> -# Port "9103" -#</Plugin> - -#<Plugin write_redis> -# <Node "example"> -# Host "localhost" -# Port "6379" -# Timeout 1000 -# Prefix "collectd/" -# </Node> -#</Plugin> - -#<Plugin write_riemann> -# <Node "example"> -# Host "localhost" -# Port 5555 -# Protocol TCP -# Batch true -# BatchMaxSize 8192 -# StoreRates true -# AlwaysAppendDS false -# TTLFactor 2.0 -# Notifications true -# CheckThresholds false -# EventServicePrefix "" -# </Node> -# Tag "foobar" -# Attribute "foo" "bar" -#</Plugin> - -#<Plugin write_sensu> -# <Node "example"> -# Host "localhost" -# Port 3030 -# StoreRates true -# AlwaysAppendDS false -# Notifications true -# Metrics true -# EventServicePrefix "" -# MetricHandler "influx" -# MetricHandler "default" -# NotificationHandler "flapjack" -# NotificationHandler "howling_monkey" -# </Node> -# Tag "foobar" -# Attribute "foo" "bar" -#</Plugin> - -#<Plugin write_tsdb> -# <Node> -# Host "localhost" -# Port "4242" -# HostTags "status=production" -# StoreRates false -# AlwaysAppendDS false -# </Node> -#</Plugin> - -#<Plugin zookeeper> -# Host "localhost" -# Port "2181" -#</Plugin> - -############################################################################## -# Filter configuration # -#----------------------------------------------------------------------------# -# The following configures collectd's filtering mechanism. Before changing # -# anything in this section, please read the `FILTER CONFIGURATION' section # -# in the collectd.conf(5) manual page. # -############################################################################## - -# Load required matches: -#LoadPlugin match_empty_counter -#LoadPlugin match_hashed -#LoadPlugin match_regex -#LoadPlugin match_value -#LoadPlugin match_timediff - -# Load required targets: -#LoadPlugin target_notification -#LoadPlugin target_replace -#LoadPlugin target_scale -#LoadPlugin target_set -#LoadPlugin target_v5upgrade - -#----------------------------------------------------------------------------# -# The following block demonstrates the default behavior if no filtering is # -# configured at all: All values will be sent to all available write plugins. # -#----------------------------------------------------------------------------# - -#<Chain "PostCache"> -# Target "write" -#</Chain> - -############################################################################## -# Threshold configuration # -#----------------------------------------------------------------------------# -# The following outlines how to configure collectd's threshold checking # -# plugin. The plugin and possible configuration options are documented in # -# the collectd-threshold(5) manual page. # -############################################################################## - -#LoadPlugin "threshold" -#<Plugin threshold> -# <Type "foo"> -# WarningMin 0.00 -# WarningMax 1000.00 -# FailureMin 0.00 -# FailureMax 1200.00 -# Invert false -# Instance "bar" -# </Type> -# -# <Plugin "interface"> -# Instance "eth0" -# <Type "if_octets"> -# FailureMax 10000000 -# DataSource "rx" -# </Type> -# </Plugin> -# -# <Host "hostname"> -# <Type "cpu"> -# Instance "idle" -# FailureMin 10 -# </Type> -# -# <Plugin "memory"> -# <Type "memory"> -# Instance "cached" -# WarningMin 100000000 -# </Type> -# </Plugin> -# -# <Type "load"> -# DataSource "midterm" -# FailureMax 4 -# Hits 3 -# Hysteresis 3 -# </Type> -# </Host> -#</Plugin>