Quantcast
Channel: VMware Communities : Blog List - All Communities
Viewing all articles
Browse latest Browse all 3805

Photon Linux のシステムログを Log Insight へ転送。(logger にて)

$
0
0

????????? VMware Photon Linux ????????????????

?????? Log Insight ?????????

 

????????Log Insight ?????????

 

Photon ????????????···

 

1. ??????????????????????

Journald ?????????????????? /run/log/journal ?????????????

?????????????OS ?????????????????

 

2. ???????????????????

???????? /run/log/journal ??????????????????

??????????OS ????????????????

Photon Linux ????????????(Journald)

 

3. Syslog ???????

logger ????? Syslog ???????????

Photon Linux ???????? Syslog ???????(logger ????)

 

????????????????

photon-logger-01.png

????Log Insight 2.5 ?????????

Log Insight ??????Syslog ??????????????????

logger ??????Log Insight ? UDP 514?????????????

?Log Insight Agent ? Photon ????????????????? logger ?···

photon-logger-02.png

 

Photon Linux ???? Log Insight ????

????Photon Linux ???????? logger ???????????????

???????????????

Photon Linux ???????? Syslog ???????(logger ????)

root [ ~ ]# cat /etc/photon-release

VMware Photon Linux 1.0 TP1

root [ ~ ]# ls -l /etc/systemd/scripts/logger.sh

-rwxr-xr-x 1 root root 225 Jul 31 08:27 /etc/systemd/scripts/logger.sh

 

Systemd ? Log Insight ????????????????Unit ???????????

root [ ~ ]# vi /etc/systemd/system/logger-loginsight.service

 

/etc/systemd/system/logger-loginsight.service ????

??vli25n01.godc.lab?????? Log Insight ???

[Unit]

Description=Journald Logger

ConditionFileIsExecutable=/etc/systemd/scripts/logger.sh

After=network-online.target

 

[Service]

ExecStart=/etc/systemd/scripts/logger.sh vli25n01.godc.lab

 

[Install]

WantedBy=multi-user.target

 

Systemd ????????~??????

root [ ~ ]# systemctl enable logger-loginsight.service

Created symlink from /etc/systemd/system/multi-user.target.wants/logger-loginsight.service to /etc/systemd/system/logger-loginsight.service.

root [ ~ ]# systemctl start logger-loginsight.service

 

??? Log Insight ? Journald ???????????

 

Log Insight ??????

 

????3?? Photon (192.168.1.31 ~ 33)??????????????

logger ??????-t????????PHOTON_LOGGER????????????

Photon ???????????????????????

 

???? Docker ???????(?docker run? ????)???????????

???? 3?????????? 1???????????????????????

photon-loginsight.png


???Photon ???? Log Insight ????????????

???????????????????···


Viewing all articles
Browse latest Browse all 3805

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>