-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
43 lines (37 loc) · 1.14 KB
/
Makefile
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
PREFIX ?= /opt/openstack-metrics
PLUGINS = collectd-nova-hypervisor-stats.py collectd-nova-aggregate.py
PLUGINS += collectd-neutron-floatingips.py collectd-keystone-stats.py
PLUGINS += collectd-cinder-stats.py
PLUGINS_FULL = $(addprefix $(PREFIX)/, $(PLUGINS))
PLUGIN_DIR = lib
.DEFAULT: all
all: $(PLUGINS_FULL)
@echo ''
@echo ''
@echo 'See README for more details'
$(PREFIX):
install -d $(PREFIX)
$(PLUGINS_FULL): $(PREFIX)
@echo ''
install $(PLUGIN_DIR)/$(subst $(PREFIX)/,,$@) $@
@echo ''
@echo "Installed $(subst $(PREFIX)/,,$@) plugin, add this"
@echo "to your collectd configuration to load this plugin:"
@echo
@echo ' <LoadPlugin "python">'
@echo ' Globals true'
@echo ' </LoadPlugin>'
@echo
@echo ' <Plugin "python">'
@echo ' # $(PLUGIN) is at $@'
@echo ' ModulePath "$(PREFIX)/"'
@echo
@echo ' Import "$(subst .py,,$(subst $(PREFIX)/,,$@))"'
@echo
@echo ' <Module "$(subst .py,,$(subst $(PREFIX)/,,$@))">'
@echo ' AuthURL "http://myopenstack.cloud.home:5000/v2.0"'
@echo ' Username "admin"'
@echo ' Password "hardhard"'
@echo ' Tenant "admin"'
@echo ' </Module>'
@echo ' </Plugin>'