Skip to content

Commit c0c85ef

Browse files
committed
Add syslog integration support
1 parent 8a105b6 commit c0c85ef

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

src/Command/Integration/IntegrationCommandBase.php

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ private function getFields()
153153
'newrelic',
154154
'splunk',
155155
'sumologic',
156+
'syslog',
156157
],
157158
]),
158159
'base_url' => new UrlField('Base URL', [
@@ -454,11 +455,60 @@ private function getFields()
454455
'description' => 'The Splunk event source type',
455456
'required' => false,
456457
]),
458+
'host' => new Field('Host', [
459+
'optionName' => 'syslog-host',
460+
// N.B. syslog is an actual PHP function name so this is wrapped in extra array brackets, to avoid is_callable() passing
461+
'conditions' => ['type' => ['syslog']],
462+
'description' => 'Syslog relay/collector host',
463+
'default' => 'localhost',
464+
'required' => false,
465+
'autoCompleterValues' => ['localhost'],
466+
]),
467+
'port' => new Field('Port', [
468+
'optionName' => 'syslog-port',
469+
'conditions' => ['type' => ['syslog']],
470+
'description' => 'Syslog relay/collector port',
471+
'default' => 514,
472+
'required' => false,
473+
'normalizer' => 'intval',
474+
]),
475+
'protocol' => new OptionsField('Protocol', [
476+
'conditions' => ['type' => ['syslog']],
477+
'description' => 'Syslog transport protocol',
478+
'default' => 'udp',
479+
'required' => false,
480+
'options' => ['tcp', 'udp', 'tls'],
481+
]),
482+
'facility' => new Field('Facility', [
483+
'conditions' => ['type' => ['syslog']],
484+
'description' => 'Syslog facility',
485+
'default' => 1,
486+
'required' => false,
487+
'normalizer' => 'intval',
488+
]),
489+
'message_format' => new OptionsField('Message format', [
490+
'conditions' => ['type' => ['syslog']],
491+
'description' => 'Syslog message format',
492+
'options' => ['rfc3164' => 'RFC 3164', 'rfc5424' => 'RFC 5424'],
493+
'default' => 'rfc5424',
494+
'required' => false,
495+
]),
496+
'auth_token' => new Field('Authentication token', [
497+
'optionName' => 'auth-token',
498+
'required' => false,
499+
]),
500+
'auth_mode' => new OptionsField('Authentication mode', [
501+
'optionName' => 'auth-mode',
502+
'required' => false,
503+
'options' => ['prefix', 'structured_data'],
504+
'default' => 'prefix',
505+
]),
457506
'tls_verify' => new BooleanField('Verify TLS', [
458507
'conditions' => ['type' => [
459508
'newrelic',
460509
'splunk',
461510
'sumologic',
511+
'syslog',
462512
]],
463513
'description' => 'Whether HTTPS certificate verification should be enabled (recommended)',
464514
'questionLine' => 'Should HTTPS certificate verification be enabled (recommended)',

0 commit comments

Comments
 (0)