Skip to content

Commit 6e16e5d

Browse files
committed
ncm-metaconfig: logstash: Fix wrapping and indentation in pan
1 parent ca05d8c commit 6e16e5d

File tree

12 files changed

+272
-230
lines changed

12 files changed

+272
-230
lines changed

ncm-metaconfig/src/main/metaconfig/logstash/1.2/tests/profiles/config.pan

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,24 @@ prefix "/software/components/metaconfig/services/{/etc/logstash/conf.d/logstash.
1010
"custom_fields", dict("type", "remotegelf"),
1111
"host", "remotehost.domain",
1212
"sender", "myhost.domain",
13-
),
1413
),
15-
);
14+
));
1615

1716
"conditionals" = append(dict(
1817
"type", "ifelseif",
1918
"expr", list(dict(
2019
"left", "[type]",
2120
"test", "==",
2221
"right", "'httpd'",
23-
)),
22+
)),
2423
"plugins", list(dict("gelf", dict(
2524
"port", 12201,
2625
"sender", 'myhost.domain',
2726
"ship_metadata", true,
2827
"host", 'remotehost.domain',
2928
"custom_fields", dict("type", "remotegelf"),
3029
"level", list("info"),
31-
))),
30+
))),
3231
));
3332

3433
"conditionals" = append(dict(
@@ -37,15 +36,15 @@ prefix "/software/components/metaconfig/services/{/etc/logstash/conf.d/logstash.
3736
"left", "[type]",
3837
"test", "==",
3938
"right", "'remotegelf'",
40-
)),
39+
)),
4140
"plugins", list(dict("gelf", dict(
4241
"port", 12201,
4342
"ship_metadata", true,
4443
"host", 'remotehost.domain',
4544
"custom_fields", dict("type", "remotegelf"),
4645
"level", list("%{level}"),
4746
"facility", "%{facility}",
48-
))),
47+
))),
4948
));
5049

5150

@@ -71,7 +70,7 @@ prefix "/software/components/metaconfig/services/{/etc/logstash/conf.d/logstash.
7170
"left", "[type]",
7271
"test", "==",
7372
"right", "'remotegelf'",
74-
)),
73+
)),
7574
"plugins", list(dict("mutate", dict(
7675
"split", dict("tags", ", "),
7776
))),
@@ -84,21 +83,21 @@ prefix "/software/components/metaconfig/services/{/etc/logstash/conf.d/logstash.
8483
"left", "[type]",
8584
"test", "==",
8685
"right", "'gpfs'",
87-
)),
86+
)),
8887
"plugins", list(
8988
dict("grok", dict(
9089
"match", list(dict(
9190
"name", "message",
9291
"pattern", list("%{GPFSLOG}"),
93-
)),
92+
)),
9493
"patterns_dir", list("/usr/share/grok"),
9594
"add_field", dict("program", "gpfs"),
96-
)),
95+
)),
9796
dict("date", dict(
9897
"match", dict(
9998
"name", "timestamp",
10099
"pattern", list("E MMM dd HH:mm:ss.SSS yyyy", "E MMM d HH:mm:ss.SSS yyyy"),
101-
),
102-
)),
103-
),
100+
),
101+
)),
102+
),
104103
));

ncm-metaconfig/src/main/metaconfig/logstash/1.2/tests/profiles/server.pan

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ prefix "/software/components/metaconfig/services/{/etc/logstash/conf.d/logstash.
3333
"left", "[type]",
3434
"test", "==",
3535
"right", "'remotegelf'",
36-
)),
36+
)),
3737
"plugins", list(dict("mutate", dict(
3838
"split", dict("tags", ", "),
3939
))),
@@ -45,24 +45,24 @@ prefix "/software/components/metaconfig/services/{/etc/logstash/conf.d/logstash.
4545
"left", "[type]",
4646
"test", "==",
4747
"right", "'syslog'",
48-
)),
48+
)),
4949
"plugins", list(
5050
dict("grok", dict(
5151
"match", list(dict(
5252
"name", "message",
5353
"pattern", list("%{RSYSLOGCUSTOM}"),
54-
)),
54+
)),
5555
"patterns_dir", list("/usr/share/grok"),
5656
"add_field", dict(
5757
"received_at", "%{@timestamp}",
5858
"received_from", "%{@source_host}",
59-
),
60-
)),
59+
),
60+
)),
6161
dict("kv", dict(
6262
"default_keys", dict(
6363
"key1", "value1",
6464
"key2", "value2",
65-
),
65+
),
6666
"exclude_keys", list("key1e", "key2e"),
6767
"include_keys", list("key1i", "key2i"),
6868
"prefix", "myprefix",
@@ -71,33 +71,35 @@ prefix "/software/components/metaconfig/services/{/etc/logstash/conf.d/logstash.
7171
"trim", "mytrim",
7272
"trimkey", "mytrimkey",
7373
"value_split", "myvaluesplit",
74-
)),
74+
)),
7575
dict("date", dict(
7676
"match", dict(
7777
"name", "syslog_timestamp",
7878
"pattern", list("yyyy-MM-dd'T'HH:mm:ss.SSSSSSZZ", "yyyy-MM-dd'T'HH:mm:ssZZ"),
79-
),
80-
)),
79+
),
80+
)),
8181
dict("mutate", dict(
8282
"exclude_tags", list("_grokparsefailure"),
8383
"replace", list(
8484
dict(
8585
"name", "@source_host",
86-
"pattern", "%{syslog_hostname}"),
86+
"pattern", "%{syslog_hostname}",
87+
),
8788
dict(
8889
"name", "@message",
89-
"pattern", "%{syslog_message}"),
90+
"pattern", "%{syslog_message}",
9091
),
91-
)),
92+
),
93+
)),
9294
dict("mutate", dict(
9395
"remove_field", list("syslog_hostname", "syslog_message", "syslog_timestamp"),
94-
)),
96+
)),
9597
dict("bytes2human", dict(
9698
"convert", dict(
9799
"field1", "bytes",
98100
"field2", "bytes",
99-
),
100-
)),
101+
),
102+
)),
101103
),
102104
));
103105

@@ -109,6 +111,6 @@ prefix "/software/components/metaconfig/services/{/etc/logstash/conf.d/logstash.
109111
"bind_host", "localhost.localdomain",
110112
"workers", 4,
111113
"port", list(9300, 9305),
112-
),
114+
),
113115
)));
114116

ncm-metaconfig/src/main/metaconfig/logstash/2.0/tests/profiles/config.pan

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,24 @@ prefix "/software/components/metaconfig/services/{/etc/logstash/conf.d/logstash.
1111
"custom_fields", dict("type", "remotegelf"),
1212
"host", "remotehost.domain",
1313
"sender", "myhost.domain",
14-
),
1514
),
16-
);
15+
));
1716

1817
"conditionals" = append(dict(
1918
"type", "ifelseif",
2019
"expr", list(dict(
2120
"left", "[type]",
2221
"test", "==",
2322
"right", "'httpd'",
24-
)),
23+
)),
2524
"plugins", list(dict("gelf", dict(
2625
"port", 12201,
2726
"sender", 'myhost.domain',
2827
"ship_metadata", true,
2928
"host", 'remotehost.domain',
3029
"custom_fields", dict("type", "remotegelf"),
3130
"level", list("info"),
32-
))),
31+
))),
3332
));
3433

3534
"conditionals" = append(dict(
@@ -38,15 +37,15 @@ prefix "/software/components/metaconfig/services/{/etc/logstash/conf.d/logstash.
3837
"left", "[type]",
3938
"test", "==",
4039
"right", "'remotegelf'",
41-
)),
40+
)),
4241
"plugins", list(dict("gelf", dict(
4342
"port", 12201,
4443
"ship_metadata", true,
4544
"host", 'remotehost.domain',
4645
"custom_fields", dict("type", "remotegelf"),
4746
"level", list("%{level}"),
4847
"facility", "%{facility}",
49-
))),
48+
))),
5049
));
5150

5251

@@ -72,7 +71,7 @@ prefix "/software/components/metaconfig/services/{/etc/logstash/conf.d/logstash.
7271
"left", "[type]",
7372
"test", "==",
7473
"right", "'remotegelf'",
75-
)),
74+
)),
7675
"plugins", list(dict("mutate", dict(
7776
"split", dict("tags", ", "),
7877
))),
@@ -85,35 +84,35 @@ prefix "/software/components/metaconfig/services/{/etc/logstash/conf.d/logstash.
8584
"left", "[type]",
8685
"test", "==",
8786
"right", "'gpfs'",
88-
)),
87+
)),
8988
"plugins", list(
9089
dict("grok", dict(
9190
"match", list(dict(
9291
"name", "message",
9392
"pattern", list("%{GPFSLOG}"),
94-
)),
93+
)),
9594
"patterns_dir", list("/usr/share/grok"),
9695
"add_field", dict("program", "gpfs"),
97-
)),
96+
)),
9897
dict('drop', dict(
9998
"_conditional", dict("expr", list(dict(
10099
"left", "[sometag]",
101100
"test", "!~",
102101
"right", "'^SOME_STRING'",
103-
))),
102+
))),
104103
"percentage", 80,
105104
"periodic_flush", true,
106-
)),
105+
)),
107106
dict('drop', dict("_conditional", dict("expr", list(dict(
108107
"left", "[someothertag]",
109108
"test", "=~",
110109
"right", "'^SOME_OTHERSTRING'",
111-
))))),
110+
))))),
112111
dict("date", dict(
113112
"match", dict(
114113
"name", "timestamp",
115114
"pattern", list("E MMM dd HH:mm:ss.SSS yyyy", "E MMM d HH:mm:ss.SSS yyyy"),
116-
),
117-
)),
118-
),
115+
),
116+
)),
117+
),
119118
));

0 commit comments

Comments
 (0)