§2024-05-16
¶redisMongo03.yushei.com.tw
alexlai@YuShei-Parking-System-API:~$ sudo apt install syslog-ng
[sudo] password for alexlai:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libc-ares2 libestr0 libfastjson4 libfwupdplugin1 libllvm11
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libbson-1.0-0 libdbi1 libesmtp6 libhiredis0.14 libivykis0 libmongoc-1.0-0 libnet1 libprotobuf-c1 librabbitmq4 libriemann-client0 syslog-ng-core
syslog-ng-mod-add-contextual-data syslog-ng-mod-amqp syslog-ng-mod-examples syslog-ng-mod-extra syslog-ng-mod-geoip2 syslog-ng-mod-getent
syslog-ng-mod-graphite syslog-ng-mod-map-value-pairs syslog-ng-mod-mongodb syslog-ng-mod-pacctformat syslog-ng-mod-python syslog-ng-mod-redis
syslog-ng-mod-riemann syslog-ng-mod-smtp syslog-ng-mod-snmptrapd-parser syslog-ng-mod-sql syslog-ng-mod-stardate syslog-ng-mod-stomp
syslog-ng-mod-tag-parser syslog-ng-mod-xml-parser
Suggested packages:
rabbitmq-server graphite-web mongodb-server libdbd-mysql libdbd-pgsql libdbd-sqlite3 activemq
The following packages will be REMOVED:
rsyslog
The following NEW packages will be installed:
libbson-1.0-0 libdbi1 libesmtp6 libhiredis0.14 libivykis0 libmongoc-1.0-0 libnet1 libprotobuf-c1 librabbitmq4 libriemann-client0 syslog-ng
syslog-ng-core syslog-ng-mod-add-contextual-data syslog-ng-mod-amqp syslog-ng-mod-examples syslog-ng-mod-extra syslog-ng-mod-geoip2 syslog-ng-mod-getent
syslog-ng-mod-graphite syslog-ng-mod-map-value-pairs syslog-ng-mod-mongodb syslog-ng-mod-pacctformat syslog-ng-mod-python syslog-ng-mod-redis
syslog-ng-mod-riemann syslog-ng-mod-smtp syslog-ng-mod-snmptrapd-parser syslog-ng-mod-sql syslog-ng-mod-stardate syslog-ng-mod-stomp
syslog-ng-mod-tag-parser syslog-ng-mod-xml-parser
0 upgraded, 32 newly installed, 1 to remove and 118 not upgraded.
Need to get 1527 kB of archives.
After this operation, 5161 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
alexlai@YuShei-Parking-System-API:~$ syslog-ng --version
syslog-ng 3 (3.25.1)
Config version: 3.25
...
alexlai@YuShei-Parking-System-API:~$ systemctl status syslog-ng.service
● syslog-ng.service - System Logger Daemon
Loaded: loaded (/lib/systemd/system/syslog-ng.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2024-05-16 17:54:32 CST; 3min 18s ago
Docs: man:syslog-ng(8)
Main PID: 512265 (syslog-ng)
Tasks: 1 (limit: 18780)
Memory: 2.6G
CGroup: /system.slice/syslog-ng.service
└─512265 /usr/sbin/syslog-ng -F
- setup syslog-ng to log /opt/package/mongoDB/log/mongod.log into hc4nas02.yushei.net
alexlai@YuShei-Parking-System-API:~$ sudo cp -v /etc/syslog-ng/syslog-ng.conf /etc/syslog-ng/syslog-ng.conf.backup
'/etc/syslog-ng/syslog-ng.conf' -> '/etc/syslog-ng/syslog-ng.conf.backup'
- edit /etc/syslog-ng/syslog-ng.conf as,