Merge ~axino/charm-telegraf/+git/telegraf-charm:socket_listener into ~telegraf-charmers/charm-telegraf:master

Proposed by Junien F
Status: Merged
Approved by: Laurent Sesquès
Approved revision: c14054d7a6ffa0a8b09cb22f08e3a32d391c7a0d
Merged at revision: 2b6cc185daf6e43f259c0e60afda615a9e55de95
Proposed branch: ~axino/charm-telegraf/+git/telegraf-charm:socket_listener
Merge into: ~telegraf-charmers/charm-telegraf:master
Diff against target: 59 lines (+10/-12)
3 files modified
dev/null (+0/-7)
reactive/telegraf.py (+5/-5)
templates/socket_listener.tmpl (+5/-0)
Reviewer Review Type Date Requested Status
Laurent Sesquès Approve
Review via email: mp+356557@code.launchpad.net

Commit message

switch from the deprecated tcp_listener to socket_listener

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Laurent Sesquès (sajoupa) wrote :

I'll hold off on this one until we release the 1.8.1 version of telegraf on https://code.launchpad.net/~telegraf-devs/+archive/ubuntu/ppa

Revision history for this message
Laurent Sesquès (sajoupa) :
review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 2b6cc185daf6e43f259c0e60afda615a9e55de95

Revision history for this message
Paul Gear (paulgear) wrote :

I've built a new charm (on bionic) from this revno; published as cs:~telegraf-charmers/telegraf-27 (cs:telegraf-20), candidate channel.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/reactive/telegraf.py b/reactive/telegraf.py
2index 6cfdaad..4454884 100644
3--- a/reactive/telegraf.py
4+++ b/reactive/telegraf.py
5@@ -90,7 +90,7 @@ def list_config_files():
6 config_files.append(config_path)
7 if 'extra_plugins.configured' in current_states.keys():
8 config_files.append('{}/extra_plugins.conf'.format(get_configs_dir()))
9- config_files.append('{}/tcp_listener.conf'.format(get_configs_dir()))
10+ config_files.append('{}/socket_listener.conf'.format(get_configs_dir()))
11 return config_files
12
13
14@@ -224,9 +224,9 @@ def get_prometheus_port():
15 return int(config.get('prometheus_output_port'))
16
17
18-def render_tcp_listener_config(context):
19- config_path = '{}/tcp_listener.conf'.format(get_configs_dir())
20- render(source='tcp_listener.tmpl', templates_dir=get_templates_dir(),
21+def render_socket_listener_config(context):
22+ config_path = '{}/socket_listener.conf'.format(get_configs_dir())
23+ render(source='socket_listener.tmpl', templates_dir=get_templates_dir(),
24 target=config_path, context=context)
25
26
27@@ -285,7 +285,7 @@ def configure_telegraf():
28 check_prometheus_port("prometheus_output", get_prometheus_port())
29 context['extra_options'] = get_extra_options()
30
31- render_tcp_listener_config(context=context)
32+ render_socket_listener_config(context=context)
33 hookenv.log("Updating main config file")
34 render(source='telegraf.conf.tmpl', templates_dir=get_templates_dir(),
35 target=config_path, context=context)
36diff --git a/templates/socket_listener.tmpl b/templates/socket_listener.tmpl
37new file mode 100644
38index 0000000..8d83e27
39--- /dev/null
40+++ b/templates/socket_listener.tmpl
41@@ -0,0 +1,5 @@
42+# Enable socket listener on loopback interface
43+# Generic socket listener capable of handling multiple socket types.
44+[[inputs.socket_listener]]
45+ # FIXME: allow configuration
46+ service_address = "tcp://127.0.0.1:8094"
47diff --git a/templates/tcp_listener.tmpl b/templates/tcp_listener.tmpl
48deleted file mode 100644
49index 41b092e..0000000
50--- a/templates/tcp_listener.tmpl
51+++ /dev/null
52@@ -1,7 +0,0 @@
53-# FIXME: this will need to change to socket listener under telegraf 1.3+
54-# Enable TCP listener on loopback interface
55-[[inputs.tcp_listener]]
56- # FIXME: allow configuration
57- service_address = "127.0.0.1:8094"
58- max_tcp_connections = 10
59- allowed_pending_messages = 10000

Subscribers

People subscribed via source and target branches

to all changes: