mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
- have some dirs
This commit is contained in:
parent
0b089ea777
commit
08346aac58
687 changed files with 0 additions and 0 deletions
46
plugins/haproxy/haproxy-bytes
Executable file
46
plugins/haproxy/haproxy-bytes
Executable file
|
@ -0,0 +1,46 @@
|
|||
#!/bin/sh
|
||||
# Pasha "p01nt" Klets <pasha@klets.name>
|
||||
|
||||
name=`basename $0`
|
||||
title=`echo ${name} | awk -F_ '{print $NF}'`
|
||||
|
||||
hp_stat() {
|
||||
echo "show stat" | socat unix-connect:/tmp/haproxy stdio
|
||||
}
|
||||
|
||||
servers_section() {
|
||||
hp_stat | grep '^'${title}',' | egrep -v '^'${title}',(FRONTEND|BACKEND)'
|
||||
}
|
||||
|
||||
servers() {
|
||||
servers_section | awk -F, '{print $2}'
|
||||
}
|
||||
|
||||
labels() {
|
||||
servers_section | awk -F, '{print $2"_out.label "$2" out\n"$2"_in.label "$2" in\n"$2"_out.type COUNTER\n"$2"_in.type COUNTER\n"$2"_in.negative "$2"_out" }'
|
||||
}
|
||||
|
||||
values() {
|
||||
servers_section | awk -F, '{print $2"_out.value "$10"\n"$2"_in.value "$9}'
|
||||
}
|
||||
|
||||
graph_title="${title} bytes"
|
||||
graph_vlabel=${title}
|
||||
|
||||
case $1 in
|
||||
config)
|
||||
cat <<EOF
|
||||
graph_category haproxy
|
||||
graph_args --base 1000
|
||||
graph_title ${graph_title}
|
||||
graph_vlabel ${graph_vlabel}
|
||||
|
||||
`labels`
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
values
|
||||
|
||||
exit 0
|
46
plugins/haproxy/haproxy-connection-errors
Executable file
46
plugins/haproxy/haproxy-connection-errors
Executable file
|
@ -0,0 +1,46 @@
|
|||
#!/bin/sh
|
||||
# Pasha "p01nt" Klets <pasha@klets.name>
|
||||
|
||||
name=`basename $0`
|
||||
title=`echo ${name} | awk -F_ '{print $NF}'`
|
||||
|
||||
hp_stat() {
|
||||
echo "show stat" | socat unix-connect:/tmp/haproxy stdio
|
||||
}
|
||||
|
||||
servers_section() {
|
||||
hp_stat | grep '^'${title}',' | egrep -v '^'${title}',(FRONTEND|BACKEND)'
|
||||
}
|
||||
|
||||
servers() {
|
||||
servers_section | awk -F, '{print $2}'
|
||||
}
|
||||
|
||||
labels() {
|
||||
servers_section | awk -F, '{print $2".label "$2"\n"$2".type COUNTER\n"$2".draw AREASTACK"}'
|
||||
}
|
||||
|
||||
values() {
|
||||
servers_section | awk -F, '{print $2".value "$14}'
|
||||
}
|
||||
|
||||
|
||||
graph_title="${title} connection errors"
|
||||
graph_vlabel=${title}
|
||||
|
||||
case $1 in
|
||||
config)
|
||||
cat <<EOF
|
||||
graph_category haproxy
|
||||
graph_title ${graph_title}
|
||||
graph_vlabel ${graph_vlabel}
|
||||
|
||||
`labels`
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
values
|
||||
|
||||
exit 0
|
45
plugins/haproxy/haproxy-downtime
Executable file
45
plugins/haproxy/haproxy-downtime
Executable file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
# Pasha "p01nt" Klets <pasha@klets.name>
|
||||
|
||||
name=`basename $0`
|
||||
title=`echo ${name} | awk -F_ '{print $NF}'`
|
||||
|
||||
hp_stat() {
|
||||
echo "show stat" | socat unix-connect:/tmp/haproxy stdio
|
||||
}
|
||||
|
||||
servers_section() {
|
||||
hp_stat | grep '^'${title}',' | egrep -v '^'${title}',(FRONTEND|BACKEND)'
|
||||
}
|
||||
|
||||
servers() {
|
||||
servers_section | awk -F, '{print $2}'
|
||||
}
|
||||
|
||||
labels() {
|
||||
servers_section | awk -F, '{print $2"_dwn.label "$2" down\n"$2"_dwntime.label "$2" downtime\n"$2"_dwn.type COUNTER\n"$2"_dwntime.type COUNTER\n"$2"_dwntime.negative "$2"_dwn" }'
|
||||
}
|
||||
|
||||
values() {
|
||||
servers_section | awk -F, '{print $2"_dwn.value "$23"\n"$2"_dwntime.value "$25}'
|
||||
}
|
||||
|
||||
graph_title="${title} downtime"
|
||||
graph_vlabel=${title}
|
||||
|
||||
case $1 in
|
||||
config)
|
||||
cat <<EOF
|
||||
graph_category haproxy
|
||||
graph_title ${graph_title}
|
||||
graph_vlabel ${graph_vlabel}
|
||||
|
||||
`labels`
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
values
|
||||
|
||||
exit 0
|
52
plugins/haproxy/haproxy-errors
Executable file
52
plugins/haproxy/haproxy-errors
Executable file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/sh
|
||||
# Pasha "p01nt" Klets <pasha@klets.name>
|
||||
|
||||
name=`basename $0`
|
||||
title=`echo ${name} | awk -F_ '{print $NF}'`
|
||||
|
||||
hp_stat() {
|
||||
echo "show stat" | socat unix-connect:/tmp/haproxy stdio
|
||||
}
|
||||
|
||||
labels() {
|
||||
cat <<EOF
|
||||
req.label requests
|
||||
req.type COUNTER
|
||||
req.draw AREASTACK
|
||||
conn.label connections
|
||||
conn.type COUNTER
|
||||
conn.draw AREASTACK
|
||||
resp.label responses
|
||||
resp.type COUNTER
|
||||
resp.draw AREASTACK
|
||||
EOF
|
||||
}
|
||||
|
||||
values() {
|
||||
cat <<EOF
|
||||
req.value `hp_stat | grep '^'${title}',FRONTEND' | awk -F, '{print $13}'`
|
||||
conn.value `hp_stat | grep '^'${title}',BACKEND' | awk -F, '{print $14}'`
|
||||
resp.value `hp_stat | grep '^'${title}',BACKEND' | awk -F, '{print $15}'`
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
graph_title="${title} errors"
|
||||
graph_vlabel=${title}
|
||||
|
||||
case $1 in
|
||||
config)
|
||||
cat <<EOF
|
||||
graph_category haproxy
|
||||
graph_title ${graph_title}
|
||||
graph_vlabel ${graph_vlabel}
|
||||
|
||||
`labels`
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
values
|
||||
|
||||
exit 0
|
46
plugins/haproxy/haproxy-failed-checks
Executable file
46
plugins/haproxy/haproxy-failed-checks
Executable file
|
@ -0,0 +1,46 @@
|
|||
#!/bin/sh
|
||||
# Pasha "p01nt" Klets <pasha@klets.name>
|
||||
|
||||
name=`basename $0`
|
||||
title=`echo ${name} | awk -F_ '{print $NF}'`
|
||||
|
||||
hp_stat() {
|
||||
echo "show stat" | socat unix-connect:/tmp/haproxy stdio
|
||||
}
|
||||
|
||||
servers_section() {
|
||||
hp_stat | grep '^'${title}',' | egrep -v '^'${title}',(FRONTEND|BACKEND)'
|
||||
}
|
||||
|
||||
servers() {
|
||||
servers_section | awk -F, '{print $2}'
|
||||
}
|
||||
|
||||
labels() {
|
||||
servers_section | awk -F, '{print $2".label "$2"\n"$2".type COUNTER\n"$2".draw AREASTACK"}'
|
||||
}
|
||||
|
||||
values() {
|
||||
servers_section | awk -F, '{print $2".value "$22}'
|
||||
}
|
||||
|
||||
|
||||
graph_title="${title} failed checks"
|
||||
graph_vlabel=${title}
|
||||
|
||||
case $1 in
|
||||
config)
|
||||
cat <<EOF
|
||||
graph_category haproxy
|
||||
graph_title ${graph_title}
|
||||
graph_vlabel ${graph_vlabel}
|
||||
|
||||
`labels`
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
values
|
||||
|
||||
exit 0
|
46
plugins/haproxy/haproxy-response-errors
Executable file
46
plugins/haproxy/haproxy-response-errors
Executable file
|
@ -0,0 +1,46 @@
|
|||
#!/bin/sh
|
||||
# Pasha "p01nt" Klets <pasha@klets.name>
|
||||
|
||||
name=`basename $0`
|
||||
title=`echo ${name} | awk -F_ '{print $NF}'`
|
||||
|
||||
hp_stat() {
|
||||
echo "show stat" | socat unix-connect:/tmp/haproxy stdio
|
||||
}
|
||||
|
||||
servers_section() {
|
||||
hp_stat | grep '^'${title}',' | egrep -v '^'${title}',(FRONTEND|BACKEND)'
|
||||
}
|
||||
|
||||
servers() {
|
||||
servers_section | awk -F, '{print $2}'
|
||||
}
|
||||
|
||||
labels() {
|
||||
servers_section | awk -F, '{print $2".label "$2"\n"$2".type COUNTER\n"$2".draw AREASTACK"}'
|
||||
}
|
||||
|
||||
values() {
|
||||
servers_section | awk -F, '{print $2".value "$15}'
|
||||
}
|
||||
|
||||
|
||||
graph_title="${title} response errors"
|
||||
graph_vlabel=${title}
|
||||
|
||||
case $1 in
|
||||
config)
|
||||
cat <<EOF
|
||||
graph_category haproxy
|
||||
graph_title ${graph_title}
|
||||
graph_vlabel ${graph_vlabel}
|
||||
|
||||
`labels`
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
values
|
||||
|
||||
exit 0
|
47
plugins/haproxy/haproxy-sessions
Executable file
47
plugins/haproxy/haproxy-sessions
Executable file
|
@ -0,0 +1,47 @@
|
|||
#!/bin/sh
|
||||
# Pasha "p01nt" Klets <pasha@klets.name>
|
||||
|
||||
name=`basename $0`
|
||||
title=`echo ${name} | awk -F_ '{print $NF}'`
|
||||
|
||||
hp_stat() {
|
||||
echo "show stat" | socat unix-connect:/tmp/haproxy stdio
|
||||
}
|
||||
|
||||
labels() {
|
||||
cat <<EOF
|
||||
frontend.label Frontend
|
||||
frontend.type GAUGE
|
||||
frontend.draw AREASTACK
|
||||
backend.label Backend
|
||||
backend.type GAUGE
|
||||
backend.draw AREASTACK
|
||||
EOF
|
||||
}
|
||||
|
||||
values() {
|
||||
cat <<EOF
|
||||
frontend.value `hp_stat | grep '^'${title}',FRONTEND' | awk -F, '{print $5}'`
|
||||
backend.value `hp_stat | grep '^'${title}',BACKEND' | awk -F, '{print $5}'`
|
||||
EOF
|
||||
}
|
||||
|
||||
graph_title="${title} sessions"
|
||||
graph_vlabel=${title}
|
||||
|
||||
case $1 in
|
||||
config)
|
||||
cat <<EOF
|
||||
graph_category haproxy
|
||||
graph_title ${graph_title}
|
||||
graph_vlabel ${graph_vlabel}
|
||||
|
||||
`labels`
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
values
|
||||
|
||||
exit 0
|
45
plugins/haproxy/haproxy-sessions-by-servers
Executable file
45
plugins/haproxy/haproxy-sessions-by-servers
Executable file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
# Pasha "p01nt" Klets <pasha@klets.name>
|
||||
|
||||
name=`basename $0`
|
||||
title=`echo ${name} | awk -F_ '{print $NF}'`
|
||||
|
||||
hp_stat() {
|
||||
echo "show stat" | socat unix-connect:/tmp/haproxy stdio
|
||||
}
|
||||
|
||||
servers_section() {
|
||||
hp_stat | grep '^'${title}',' | egrep -v '^'${title}',(FRONTEND|BACKEND)'
|
||||
}
|
||||
|
||||
servers() {
|
||||
servers_section | awk -F, '{print $2}'
|
||||
}
|
||||
|
||||
labels() {
|
||||
servers_section | awk -F, '{print $2".label "$2"\n"$2".type GAUGE\n"$2".draw AREASTACK"}'
|
||||
}
|
||||
|
||||
values() {
|
||||
servers_section | awk -F, '{print $2".value "$5}'
|
||||
}
|
||||
|
||||
graph_title="${title} sessions by servers"
|
||||
graph_vlabel=${title}
|
||||
|
||||
case $1 in
|
||||
config)
|
||||
cat <<EOF
|
||||
graph_category haproxy
|
||||
graph_title ${graph_title}
|
||||
graph_vlabel ${graph_vlabel}
|
||||
|
||||
`labels`
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
values
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue