mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Save with UNIX line breaks
This commit is contained in:
parent
ea4a0c6244
commit
1c67e3d648
1 changed files with 42 additions and 42 deletions
|
@ -1,42 +1,42 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
vmta="208-97-205-153"
|
vmta="208-97-205-153"
|
||||||
# Lets run the command to pull the vmta's in
|
# Lets run the command to pull the vmta's in
|
||||||
queues=(`pmta show queue */$vmta | awk -F" " '{print $1}'`) # Pull in top queues
|
queues=(`pmta show queue */$vmta | awk -F" " '{print $1}'`) # Pull in top queues
|
||||||
|
|
||||||
# Now we need to do some further cleanup for blank or erroneous array items
|
# Now we need to do some further cleanup for blank or erroneous array items
|
||||||
unset queues[0]
|
unset queues[0]
|
||||||
unset queues[${#queues[@]}]
|
unset queues[${#queues[@]}]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
config)
|
config)
|
||||||
|
|
||||||
echo "graph_title RGMTA2 PMTA VMTA $vmta Recipents"
|
echo "graph_title RGMTA2 PMTA VMTA $vmta Recipents"
|
||||||
echo "graph_vlabel recipents"
|
echo "graph_vlabel recipents"
|
||||||
echo "graph_scale no"
|
echo "graph_scale no"
|
||||||
echo "graph_category PowerMTA"
|
echo "graph_category PowerMTA"
|
||||||
for i in ${queues[@]};do
|
for i in ${queues[@]};do
|
||||||
queue=(`pmta show queue $i`)
|
queue=(`pmta show queue $i`)
|
||||||
unset queue[0]
|
unset queue[0]
|
||||||
unset queue[${#queue[@]}]
|
unset queue[${#queue[@]}]
|
||||||
|
|
||||||
domain=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1 | sed -e 's/[\.]/_/g'`
|
domain=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1 | sed -e 's/[\.]/_/g'`
|
||||||
domain2=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1`
|
domain2=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1`
|
||||||
echo $domain'.label '$domain2
|
echo $domain'.label '$domain2
|
||||||
echo $domain'.draw STACK'
|
echo $domain'.draw STACK'
|
||||||
done
|
done
|
||||||
exit 0;;
|
exit 0;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
for i in ${queues[@]};do
|
for i in ${queues[@]};do
|
||||||
queue=(`pmta show queue $i`)
|
queue=(`pmta show queue $i`)
|
||||||
unset queue[0]
|
unset queue[0]
|
||||||
unset queue[${#queue[@]}]
|
unset queue[${#queue[@]}]
|
||||||
|
|
||||||
domain=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1 | sed -e 's/[\.]/_/g'`
|
domain=`echo "${queue[7]}" | awk -F" " '{print $1}' | cut -d/ -f1 | sed -e 's/[\.]/_/g'`
|
||||||
recpts=${queue[8]}
|
recpts=${queue[8]}
|
||||||
conns=${queue[10]}
|
conns=${queue[10]}
|
||||||
echo $domain'.value '$recpts
|
echo $domain'.value '$recpts
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue