forked from hirose31/ganglia-pymodule_skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·52 lines (44 loc) · 804 Bytes
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
[ $# -eq 1 ] || { echo "$0 NAME - create ganglia-pymodule_NAME"; exit 1; }
name=$1
dir=ganglia-pymodule_$name
mkdir $dir
mkdir $dir/{conf.d,junk,python_modules}
cat <<EOF > $dir/README.mkdn
$name
===============
python module for ganglia 3.1.
"$name" send metrics on fixme.
EOF
cat <<EOF > $dir/conf.d/$name.conf
modules {
module {
name = "$name"
language = "python"
param device {
value = "bond0"
}
param host {
value = "goa"
}
}
}
collection_group {
collect_every = 20
time_threshold = 90
metric {
name = "foo"
title = "Title of Foo"
value_threshold = 1.0
}
metric {
name = "bar"
title = "Title of Bar"
value_threshold = 1.0
}
}
EOF
cat <<EOF
TODO:
cp skel_xxx.py $dir/python_modules/$name.py
EOF