Skip to content

Commit

Permalink
netgear
Browse files Browse the repository at this point in the history
  • Loading branch information
james-otten committed Feb 27, 2025
1 parent 286be11 commit 211fb43
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@
| 517 | UDP | Brocade |
| 518 | UDP | iLO |
| 519 | UDP | iDRAC |
| 520 | UDP | Netgear |

## Add a new port

1. Add a new file under [ansible/roles/log_collector/files/](./ansible/roles/log_collector/files/)
2. Add the port + ruleset mapping to [ansible/roles/log_collector/files/rsyslog.conf](./ansible/roles/log_collector/files/rsyslog.conf)
3. Add the 3 mappings in [ansible/roles/log_collector/tasks/main.yaml](./ansible/roles/log_collector/tasks/main.yaml) for DD ingestion, file creation, and config file transfer.
4. Update the table in this file.
4 changes: 4 additions & 0 deletions ansible/roles/log_collector/files/70-netgear.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# netgear logs
ruleset(name="netgear"){
action(type="omfile" file="/var/log/netgear.log")
}
1 change: 1 addition & 0 deletions ansible/roles/log_collector/files/rsyslog.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ input(type="imudp" port="516" ruleset="ubiquiti")
input(type="imudp" port="517" ruleset="brocade")
input(type="imudp" port="518" ruleset="ilo")
input(type="imudp" port="519" ruleset="idrac")
input(type="imudp" port="520" ruleset="netgear")

# provides TCP syslog reception
module(load="imtcp")
Expand Down
11 changes: 11 additions & 0 deletions ansible/roles/log_collector/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
path: "/var/log/idrac.log"
service: "mesh_devices"
source: "idrac"
- type: file
path: "/var/log/netgear.log"
service: "mesh_devices"
source: "netgear"

- name: Create log file for {{ item }}
ansible.builtin.file:
Expand All @@ -131,6 +135,7 @@
- cambium
- ilo
- idrac
- netgear

- name: Rsyslog main config
ansible.builtin.copy:
Expand Down Expand Up @@ -174,6 +179,12 @@
dest: /etc/rsyslog.d/60-idrac.conf
mode: "644"

- name: Rsyslog netgear config
ansible.builtin.copy:
src: 70-netgear.conf
dest: /etc/rsyslog.d/70-netgear.conf
mode: "644"

- name: Reload rsyslog
ansible.builtin.systemd_service:
name: rsyslog
Expand Down

0 comments on commit 211fb43

Please sign in to comment.