Build system: Install the config file.
authorFlorian Forster <ff@octo.it>
Sat, 19 Jun 2010 07:17:14 +0000 (09:17 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sat, 19 Jun 2010 07:17:14 +0000 (09:17 +0200)
Makefile.am
collection.conf [deleted file]
configure.ac
share/Makefile.am [new file with mode: 0644]
share/collection.conf [new file with mode: 0644]
src/Makefile.am

index af437a6..1f529a8 100644 (file)
@@ -1 +1 @@
-SUBDIRS = src
+SUBDIRS = share src
diff --git a/collection.conf b/collection.conf
deleted file mode 100644 (file)
index eb33fe0..0000000
+++ /dev/null
@@ -1,391 +0,0 @@
-<Graph>
-  Host "/any/"
-  Plugin "cpu"
-  PluginInstance "/any/"
-  Type "cpu"
-  TypeInstance "/all/"
-
-  Title "CPU utilization"
-  VerticalLabel "Jiffies"
-
-  <DEF>
-    TypeInstance "idle"
-    DSName "value"
-    Legend "Idle   "
-    Color "e8e8e8"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-  <DEF>
-    TypeInstance "nice"
-    DSName "value"
-    Legend "Nice   "
-    Color "00e000"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-  <DEF>
-    TypeInstance "user"
-    DSName "value"
-    Legend "User   "
-    Color "0000ff"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-  <DEF>
-    TypeInstance "wait"
-    DSName "value"
-    Legend "Wait-IO"
-    Color "ffb000"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-  <DEF>
-    TypeInstance "system"
-    DSName "value"
-    Legend "System "
-    Color "ff0000"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-  <DEF>
-    TypeInstance "softirq"
-    DSName "value"
-    Legend "SoftIRQ"
-    Color "ff00ff"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-  <DEF>
-    TypeInstance "interrupt"
-    DSName "value"
-    Legend "IRQ    "
-    Color "a000a0"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-  <DEF>
-    TypeInstance "steal"
-    DSName "value"
-    Legend "Steal  "
-    Color "000000"
-    Area true
-    Stack true
-    Format "%6.2lf"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "df"
-  PluginInstance "/any/"
-  Type "df_complex"
-  TypeInstance "/all/"
-
-  Title "Diskspace"
-  VerticalLabel "Bytes"
-  ShowZero true
-
-  <DEF>
-    TypeInstance "used"
-    DSName "value"
-    Legend "Used    "
-    Color "ff0000"
-    Area true
-    #Stack true
-    Format "%5.1lf%s"
-  </DEF>
-  <DEF>
-    TypeInstance "reserved"
-    DSName "value"
-    Legend "Reserved"
-    Color "ffb000"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-  <DEF>
-    TypeInstance "free"
-    DSName "value"
-    Legend "Free    "
-    Color "00bf00"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "df"
-  PluginInstance "/any/"
-  Type "df_inodes"
-  TypeInstance "/all/"
-
-  Title "Diskspace (Inodes)"
-  VerticalLabel "Inodes"
-  ShowZero true
-
-  <DEF>
-    TypeInstance "used"
-    DSName "value"
-    Legend "Used    "
-    Color "ff0000"
-    Area true
-    #Stack true
-  </DEF>
-  <DEF>
-    TypeInstance "reserved"
-    DSName "value"
-    Legend "Reserved"
-    Color "ffb000"
-    Area true
-    Stack true
-  </DEF>
-  <DEF>
-    TypeInstance "free"
-    DSName "value"
-    Legend "Free    "
-    Color "00bf00"
-    Area true
-    Stack true
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "df"
-  PluginInstance ""
-  Type "df"
-  TypeInstance "/any/"
-
-  Title "Diskspace (legacy)"
-  VerticalLabel "Bytes"
-  ShowZero true
-
-  <DEF>
-    DSName "used"
-    Legend "Used"
-    Color "ff0000"
-    Area true
-    #Stack true
-    Format "%5.1lf%s"
-  </DEF>
-  <DEF>
-    DSName "free"
-    Legend "Free"
-    Color "00bf00"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "disk"
-  PluginInstance "/any/"
-  Type "disk_merged"
-  TypeInstance ""
-
-  Title "Disk merged operations"
-
-  <DEF>
-    DSName "read"
-    Legend "Read "
-    Color "0000ff"
-  </DEF>
-  <DEF>
-    DSName "write"
-    Legend "Write"
-    Color "00bf00"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "disk"
-  PluginInstance "/any/"
-  Type "disk_octets"
-  TypeInstance ""
-
-  Title "Disk octets"
-
-  <DEF>
-    DSName "read"
-    Legend "Read "
-    Color "0000ff"
-  </DEF>
-  <DEF>
-    DSName "write"
-    Legend "Write"
-    Color "00bf00"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "disk"
-  PluginInstance "/any/"
-  Type "disk_ops"
-  TypeInstance ""
-
-  Title "Disk operations"
-
-  <DEF>
-    DSName "read"
-    Legend "Read "
-    Color "0000ff"
-  </DEF>
-  <DEF>
-    DSName "write"
-    Legend "Write"
-    Color "00bf00"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "disk"
-  PluginInstance "/any/"
-  Type "disk_time"
-  TypeInstance ""
-
-  Title "Disk time per op"
-
-  <DEF>
-    DSName "read"
-    Legend "Read "
-    Color "0000ff"
-  </DEF>
-  <DEF>
-    DSName "write"
-    Legend "Write"
-    Color "00bf00"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "memory"
-  PluginInstance ""
-  Type "memory"
-  TypeInstance "/all/"
-
-  Title "Memory utilization"
-  VerticalLabel "Bytes"
-  ShowZero true
-
-  <DEF>
-    TypeInstance "free"
-    DSName "value"
-    Legend "Free    "
-    Color "00e000"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-  <DEF>
-    TypeInstance "cached"
-    DSName "value"
-    Legend "Cached  "
-    Color "0000ff"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-  <DEF>
-    TypeInstance "buffered"
-    DSName "value"
-    Legend "Buffered"
-    Color "ffb000"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-  <DEF>
-    TypeInstance "locked"
-    DSName "value"
-    Legend "Locked  "
-    Color "ff00ff"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-  <DEF>
-    TypeInstance "used"
-    DSName "value"
-    Legend "Used    "
-    Color "ff0000"
-    Area true
-    Stack true
-    Format "%5.1lf%s"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "processes"
-  PluginInstance ""
-  Type "ps_state"
-  TypeInstance "/all/"
-
-  Title "Processes"
-  VerticalLabel "Processes"
-
-  <DEF>
-    TypeInstance "paging"
-    DSName "value"
-    Legend "Paging  "
-    Color "ffb000"
-  </DEF>
-  <DEF>
-    TypeInstance "blocked"
-    DSName "value"
-    Legend "Blocked "
-    Color "ff00ff"
-  </DEF>
-  <DEF>
-    TypeInstance "zombies"
-    DSName "value"
-    Legend "Zombies "
-    Color "ff0000"
-  </DEF>
-  <DEF>
-    TypeInstance "stopped"
-    DSName "value"
-    Legend "Stopped "
-    Color "a000a0"
-  </DEF>
-  <DEF>
-    TypeInstance "running"
-    DSName "value"
-    Legend "Running "
-    Color "00e000"
-  </DEF>
-  <DEF>
-    TypeInstance "sleeping"
-    DSName "value"
-    Legend "Sleeping"
-    Color "0000ff"
-  </DEF>
-</Graph>
-
-<Graph>
-  Host "/any/"
-  Plugin "swap"
-  PluginInstance ""
-  Type "swap"
-  TypeInstance "/all/"
-
-  Title "Swap utilization"
-  VerticalLabel "Bytes"
-</Graph>
-
index 9c8b628..125f37b 100644 (file)
@@ -30,4 +30,4 @@ AC_CHECK_LIB(fcgi, FCGI_Accept, [],
 AC_CHECK_LIB(rrd_th, rrd_graph_v, [],
             [AC_MSG_ERROR(cannot find librrd_th.)], [-lm])
 
-AC_OUTPUT(Makefile src/Makefile)
+AC_OUTPUT(Makefile share/Makefile src/Makefile)
diff --git a/share/Makefile.am b/share/Makefile.am
new file mode 100644 (file)
index 0000000..98d31c5
--- /dev/null
@@ -0,0 +1,2 @@
+dist_sysconf_DATA = collection.conf
+
diff --git a/share/collection.conf b/share/collection.conf
new file mode 100644 (file)
index 0000000..eb33fe0
--- /dev/null
@@ -0,0 +1,391 @@
+<Graph>
+  Host "/any/"
+  Plugin "cpu"
+  PluginInstance "/any/"
+  Type "cpu"
+  TypeInstance "/all/"
+
+  Title "CPU utilization"
+  VerticalLabel "Jiffies"
+
+  <DEF>
+    TypeInstance "idle"
+    DSName "value"
+    Legend "Idle   "
+    Color "e8e8e8"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+  <DEF>
+    TypeInstance "nice"
+    DSName "value"
+    Legend "Nice   "
+    Color "00e000"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+  <DEF>
+    TypeInstance "user"
+    DSName "value"
+    Legend "User   "
+    Color "0000ff"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+  <DEF>
+    TypeInstance "wait"
+    DSName "value"
+    Legend "Wait-IO"
+    Color "ffb000"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+  <DEF>
+    TypeInstance "system"
+    DSName "value"
+    Legend "System "
+    Color "ff0000"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+  <DEF>
+    TypeInstance "softirq"
+    DSName "value"
+    Legend "SoftIRQ"
+    Color "ff00ff"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+  <DEF>
+    TypeInstance "interrupt"
+    DSName "value"
+    Legend "IRQ    "
+    Color "a000a0"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+  <DEF>
+    TypeInstance "steal"
+    DSName "value"
+    Legend "Steal  "
+    Color "000000"
+    Area true
+    Stack true
+    Format "%6.2lf"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "df"
+  PluginInstance "/any/"
+  Type "df_complex"
+  TypeInstance "/all/"
+
+  Title "Diskspace"
+  VerticalLabel "Bytes"
+  ShowZero true
+
+  <DEF>
+    TypeInstance "used"
+    DSName "value"
+    Legend "Used    "
+    Color "ff0000"
+    Area true
+    #Stack true
+    Format "%5.1lf%s"
+  </DEF>
+  <DEF>
+    TypeInstance "reserved"
+    DSName "value"
+    Legend "Reserved"
+    Color "ffb000"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+  <DEF>
+    TypeInstance "free"
+    DSName "value"
+    Legend "Free    "
+    Color "00bf00"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "df"
+  PluginInstance "/any/"
+  Type "df_inodes"
+  TypeInstance "/all/"
+
+  Title "Diskspace (Inodes)"
+  VerticalLabel "Inodes"
+  ShowZero true
+
+  <DEF>
+    TypeInstance "used"
+    DSName "value"
+    Legend "Used    "
+    Color "ff0000"
+    Area true
+    #Stack true
+  </DEF>
+  <DEF>
+    TypeInstance "reserved"
+    DSName "value"
+    Legend "Reserved"
+    Color "ffb000"
+    Area true
+    Stack true
+  </DEF>
+  <DEF>
+    TypeInstance "free"
+    DSName "value"
+    Legend "Free    "
+    Color "00bf00"
+    Area true
+    Stack true
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "df"
+  PluginInstance ""
+  Type "df"
+  TypeInstance "/any/"
+
+  Title "Diskspace (legacy)"
+  VerticalLabel "Bytes"
+  ShowZero true
+
+  <DEF>
+    DSName "used"
+    Legend "Used"
+    Color "ff0000"
+    Area true
+    #Stack true
+    Format "%5.1lf%s"
+  </DEF>
+  <DEF>
+    DSName "free"
+    Legend "Free"
+    Color "00bf00"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "disk"
+  PluginInstance "/any/"
+  Type "disk_merged"
+  TypeInstance ""
+
+  Title "Disk merged operations"
+
+  <DEF>
+    DSName "read"
+    Legend "Read "
+    Color "0000ff"
+  </DEF>
+  <DEF>
+    DSName "write"
+    Legend "Write"
+    Color "00bf00"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "disk"
+  PluginInstance "/any/"
+  Type "disk_octets"
+  TypeInstance ""
+
+  Title "Disk octets"
+
+  <DEF>
+    DSName "read"
+    Legend "Read "
+    Color "0000ff"
+  </DEF>
+  <DEF>
+    DSName "write"
+    Legend "Write"
+    Color "00bf00"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "disk"
+  PluginInstance "/any/"
+  Type "disk_ops"
+  TypeInstance ""
+
+  Title "Disk operations"
+
+  <DEF>
+    DSName "read"
+    Legend "Read "
+    Color "0000ff"
+  </DEF>
+  <DEF>
+    DSName "write"
+    Legend "Write"
+    Color "00bf00"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "disk"
+  PluginInstance "/any/"
+  Type "disk_time"
+  TypeInstance ""
+
+  Title "Disk time per op"
+
+  <DEF>
+    DSName "read"
+    Legend "Read "
+    Color "0000ff"
+  </DEF>
+  <DEF>
+    DSName "write"
+    Legend "Write"
+    Color "00bf00"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "memory"
+  PluginInstance ""
+  Type "memory"
+  TypeInstance "/all/"
+
+  Title "Memory utilization"
+  VerticalLabel "Bytes"
+  ShowZero true
+
+  <DEF>
+    TypeInstance "free"
+    DSName "value"
+    Legend "Free    "
+    Color "00e000"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+  <DEF>
+    TypeInstance "cached"
+    DSName "value"
+    Legend "Cached  "
+    Color "0000ff"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+  <DEF>
+    TypeInstance "buffered"
+    DSName "value"
+    Legend "Buffered"
+    Color "ffb000"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+  <DEF>
+    TypeInstance "locked"
+    DSName "value"
+    Legend "Locked  "
+    Color "ff00ff"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+  <DEF>
+    TypeInstance "used"
+    DSName "value"
+    Legend "Used    "
+    Color "ff0000"
+    Area true
+    Stack true
+    Format "%5.1lf%s"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "processes"
+  PluginInstance ""
+  Type "ps_state"
+  TypeInstance "/all/"
+
+  Title "Processes"
+  VerticalLabel "Processes"
+
+  <DEF>
+    TypeInstance "paging"
+    DSName "value"
+    Legend "Paging  "
+    Color "ffb000"
+  </DEF>
+  <DEF>
+    TypeInstance "blocked"
+    DSName "value"
+    Legend "Blocked "
+    Color "ff00ff"
+  </DEF>
+  <DEF>
+    TypeInstance "zombies"
+    DSName "value"
+    Legend "Zombies "
+    Color "ff0000"
+  </DEF>
+  <DEF>
+    TypeInstance "stopped"
+    DSName "value"
+    Legend "Stopped "
+    Color "a000a0"
+  </DEF>
+  <DEF>
+    TypeInstance "running"
+    DSName "value"
+    Legend "Running "
+    Color "00e000"
+  </DEF>
+  <DEF>
+    TypeInstance "sleeping"
+    DSName "value"
+    Legend "Sleeping"
+    Color "0000ff"
+  </DEF>
+</Graph>
+
+<Graph>
+  Host "/any/"
+  Plugin "swap"
+  PluginInstance ""
+  Type "swap"
+  TypeInstance "/all/"
+
+  Title "Swap utilization"
+  VerticalLabel "Bytes"
+</Graph>
+
index 9b235ba..9b91a91 100644 (file)
@@ -1,8 +1,12 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies
 
+AM_CPPFLAGS = -DPREFIX='"${prefix}"'
+AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/collection.conf"'
+
 if COMPILER_IS_GCC
 AM_CFLAGS = -Wall -Wextra
 endif
+
 AM_YFLAGS = -d
 
 BUILT_SOURCES = parser.h