Skip to content

rsyslog hld update#1

Closed
iavraham wants to merge 1 commit intomasterfrom
rsyslog_hld_update
Closed

rsyslog hld update#1
iavraham wants to merge 1 commit intomasterfrom
rsyslog_hld_update

Conversation

@iavraham
Copy link
Owner

rsyslog HLD update

@iavraham iavraham self-assigned this Jan 10, 2023
@dgsudharsan
Copy link

@iavraham Please update the description of this PR. What are the changes that are being introduced?

| Rev | Date | Author | Description |
|:---:|:----------:|:--------------:|:----------------------|
| 0.1 | 18/04/2022 | Nazarii Hnydyn | Initial version |
| 0.2 | 08/01/2022 | Ido Avraham | extend capabilities |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2023*

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will fix

**This feature will support the following commands:**
1. config: add/delete syslog server configuration
2. show: display syslog server configuration
3. config: set/unset global syslog configuration

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 & 4 is for regex and severity filtering?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it's for global syslog changes.
for the global (default) severity and message format


#### 3.4.1.1. Global syslog table
```abnf
; define schema for syslog global configuration attributes under SYSLOG_CONFIG|GLOBAL

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this config going to affect the local syslog? The patterns applied here are going to suppress logs at local device. Is thet correct?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is not. The new configuration presented in this table is only for sending logs to remote syslog server.

| port | port | SYSLOG_SERVER\|key\|port |
| vrf | device | SYSLOG_SERVER\|key\|vrf |
| protocol | protocol | SYSLOG_SERVER\|key\|protocol |
| filter | ereregex | SYSLOG_SERVER\|key\|filter |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filter values should be include/exclude right? The filter_pattern should be ereregex.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, but from what i understood this table indicates the related parameter in the rsyslogd config file and this is why i wrote eregex. there is no include/exclude field there. it controls the "!" before eregrex field.
do you want me to change it?

; field = value
format = template-format ; template to send logs
welf_firewall_name = template
trap = log-level

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is for local syslog, should we rename this field loglevel instead of trap?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it was mentioned in previous comment, it is only for sending to remote

```

### 2.4.3 Configuration sample
7) "protocol"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide configuration example for SYSLOG_CONFIG

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will add

@@ -430,10 +634,14 @@ _config syslog add_
1. `-s|--source` - source ip address

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we planning to add config commands for SYSLOG_CONFIG too?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we discussed, define new CLI that can be added to sonic, but we won’t implement it as part of the push of the feature

leaf server_address {
description "Syslog server IP address";
type inet:ip-address;
type inet:host;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By this change it also makes the ip address that can be configured using domain name. Is that correct? Please update other locations in this file too

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is correct, there are no other places in the file that needs to be changed

@iavraham iavraham closed this Jan 16, 2023
@iavraham
Copy link
Owner Author

creating public pull request

@fastiuk
Copy link
Collaborator

fastiuk commented Jan 16, 2023

@dgsudharsan Ido updated HLD according to your comments and created public PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants