{"id":779,"date":"2014-10-22T18:14:47","date_gmt":"2014-10-22T18:14:47","guid":{"rendered":"http:\/\/shivdev.com\/blog\/?p=779"},"modified":"2014-10-22T18:16:19","modified_gmt":"2014-10-22T18:16:19","slug":"syslogng-the-basics","status":"publish","type":"post","link":"http:\/\/shivdev.com\/blog\/2014\/10\/22\/syslogng-the-basics\/","title":{"rendered":"SyslogNG &#8211; The Basics"},"content":{"rendered":"<p>You can find enough documentation online and <a href=\"http:\/\/edoceo.com\/howto\/syslog-ng\">edoceo<\/a> is a good resource. But the basics of setting up Syslog-NG are as follows. <\/p>\n<p>Setup and configure the Host Machine where you will receive the syslog messages.<\/p>\n<blockquote><p>\n# 1. Install syslog-ng<br \/>\n$ sudo apt-get install syslog-ng<\/p>\n<p># 2. Backup the config file syslog-ng.conf<br \/>\n$ sudo cp \/etc\/syslog-ng\/syslog-ng.conf \/etc\/syslog-ng\/syslog-ng.conf.orig<\/p>\n<p># 3. Edit the config file<br \/>\n$ sudo vi \/etc\/syslog-ng\/syslog-ng.conf<\/p>\n<p># 4. Create a <strong>Source<\/strong>, a <strong>Destination<\/strong> and bind them together through <strong>Log<\/strong><br \/>\n# Add these in the relevant sections<br \/>\nsource s_net { udp(ip(&#8220;0.0.0.0&#8221;) port(514)); tcp(); };<br \/>\ndestination d_somedest { file(&#8220;\/var\/log\/somedest.log&#8221;); };<br \/>\nlog { source ( s_net );  destination ( d_somedest ); };<\/p>\n<p># 5. Restart syslog-ng<br \/>\n$ sudo service syslog-ng restart<\/p>\n<\/blockquote>\n<p>When you configure your Appliance to forward syslog to your Host, you will see the logs in &#8220;\/var\/log\/somedest.log&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can find enough documentation online and edoceo is a good resource. But the basics of setting up Syslog-NG are as follows. Setup and configure the Host Machine where you will receive the syslog messages. # 1. Install syslog-ng $ sudo apt-get install syslog-ng # 2. Backup the config file syslog-ng.conf $ sudo cp \/etc\/syslog-ng\/syslog-ng.conf [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[],"_links":{"self":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/779"}],"collection":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/comments?post=779"}],"version-history":[{"count":3,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/779\/revisions"}],"predecessor-version":[{"id":782,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/779\/revisions\/782"}],"wp:attachment":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/media?parent=779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/categories?post=779"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/tags?post=779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}