fluent-plugin-postgresql-csvlog 0.3.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.gitlab-ci.yml +27 -3
- data/README.md +17 -0
- data/docker-compose.yml +26 -8
- data/example-fluentd.conf +30 -1
- data/fluent-plugin-postgresql-csvlog.gemspec +1 -1
- data/lib/fluent/plugin/filter_marginalia.rb +3 -67
- data/lib/fluent/plugin/in_pg_stat_activity.rb +118 -0
- data/lib/fluent/plugin/in_pg_stat_statements.rb +59 -77
- data/lib/fluent/plugin/marginalia_extractor.rb +73 -0
- data/lib/fluent/plugin/polling_pg_input_plugin.rb +100 -0
- data/test/helper.rb +2 -0
- data/test/plugin/itest_in_pg_stat_activity.rb +115 -0
- data/test/plugin/itest_in_pg_stat_statements.rb +3 -3
- data/test/plugin/test_in_pg_stat_activity.rb +223 -0
- data/test/plugin/test_in_pg_stat_statements.rb +64 -10
- data/test/plugin/test_marginalia_extractor.rb +103 -0
- data/test/verify-docker-compose.sh +32 -0
- metadata +18 -6
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
# This script is use by the end-to-end fluent test
|
4
|
+
# See the docker-compose.yml for more details
|
5
|
+
|
6
|
+
cleanup() {
|
7
|
+
echo "# removing all logs"
|
8
|
+
find /var/log/pg/ -name "pg_stat_statements.*.log" -delete
|
9
|
+
find /var/log/pg/ -name "pg_stat_activity.*.log" -delete
|
10
|
+
}
|
11
|
+
|
12
|
+
die() {
|
13
|
+
cleanup
|
14
|
+
echo "$1"
|
15
|
+
exit 1
|
16
|
+
}
|
17
|
+
|
18
|
+
cleanup
|
19
|
+
echo "# sleeping 10, awaiting logs"
|
20
|
+
sleep 10;
|
21
|
+
|
22
|
+
echo "# looking for pg_stat_statements"
|
23
|
+
|
24
|
+
(find /var/log/pg/ -name "pg_stat_statements.*.log" | grep . >/dev/null) || die "No pg_stat_statements files created"
|
25
|
+
cat /var/log/pg/pg_stat_statements.*.log | tail -10
|
26
|
+
|
27
|
+
echo "# looking for pg_stat_activity"
|
28
|
+
|
29
|
+
(find /var/log/pg/ -name "pg_stat_activity.*.log" | grep . >/dev/null) || die "No pg_stat_activity files created"
|
30
|
+
cat /var/log/pg/pg_stat_activity.*.log | tail -10
|
31
|
+
|
32
|
+
cleanup
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-postgresql-csvlog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stanhu
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -93,6 +93,7 @@ executables: []
|
|
93
93
|
extensions: []
|
94
94
|
extra_rdoc_files: []
|
95
95
|
files:
|
96
|
+
- ".gitignore"
|
96
97
|
- ".gitlab-ci.yml"
|
97
98
|
- Dockerfile
|
98
99
|
- Gemfile
|
@@ -105,19 +106,26 @@ files:
|
|
105
106
|
- lib/fluent/plugin/filter_marginalia.rb
|
106
107
|
- lib/fluent/plugin/filter_postgresql_redactor.rb
|
107
108
|
- lib/fluent/plugin/filter_postgresql_slowlog.rb
|
109
|
+
- lib/fluent/plugin/in_pg_stat_activity.rb
|
108
110
|
- lib/fluent/plugin/in_pg_stat_statements.rb
|
111
|
+
- lib/fluent/plugin/marginalia_extractor.rb
|
109
112
|
- lib/fluent/plugin/parser_multiline_csv.rb
|
113
|
+
- lib/fluent/plugin/polling_pg_input_plugin.rb
|
110
114
|
- sql/create_extension.sql
|
111
115
|
- test/helper.rb
|
116
|
+
- test/plugin/itest_in_pg_stat_activity.rb
|
112
117
|
- test/plugin/itest_in_pg_stat_statements.rb
|
113
118
|
- test/plugin/test_filter_marginalia.rb
|
114
119
|
- test/plugin/test_filter_postgresql_redactor.rb
|
115
120
|
- test/plugin/test_filter_postgresql_slowlog.rb
|
121
|
+
- test/plugin/test_in_pg_stat_activity.rb
|
116
122
|
- test/plugin/test_in_pg_stat_statements.rb
|
123
|
+
- test/plugin/test_marginalia_extractor.rb
|
124
|
+
- test/verify-docker-compose.sh
|
117
125
|
homepage: https://gitlab.com/gitlab-org/fluent-plugins/fluent-plugin-postgresql-csvlog
|
118
126
|
licenses: []
|
119
127
|
metadata: {}
|
120
|
-
post_install_message:
|
128
|
+
post_install_message:
|
121
129
|
rdoc_options: []
|
122
130
|
require_paths:
|
123
131
|
- lib
|
@@ -132,14 +140,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
140
|
- !ruby/object:Gem::Version
|
133
141
|
version: '0'
|
134
142
|
requirements: []
|
135
|
-
rubygems_version: 3.
|
136
|
-
signing_key:
|
143
|
+
rubygems_version: 3.2.28
|
144
|
+
signing_key:
|
137
145
|
specification_version: 4
|
138
146
|
summary: fluentd plugins to work with PostgreSQL CSV logs
|
139
147
|
test_files:
|
140
148
|
- test/helper.rb
|
149
|
+
- test/plugin/itest_in_pg_stat_activity.rb
|
141
150
|
- test/plugin/itest_in_pg_stat_statements.rb
|
142
151
|
- test/plugin/test_filter_marginalia.rb
|
143
152
|
- test/plugin/test_filter_postgresql_redactor.rb
|
144
153
|
- test/plugin/test_filter_postgresql_slowlog.rb
|
154
|
+
- test/plugin/test_in_pg_stat_activity.rb
|
145
155
|
- test/plugin/test_in_pg_stat_statements.rb
|
156
|
+
- test/plugin/test_marginalia_extractor.rb
|
157
|
+
- test/verify-docker-compose.sh
|