{"id":5271,"date":"2023-07-05T15:45:16","date_gmt":"2023-07-05T20:45:16","guid":{"rendered":"https:\/\/www.incredigeek.com\/home\/?p=5271"},"modified":"2023-07-05T15:49:30","modified_gmt":"2023-07-05T20:49:30","slug":"server-logs-not-showing-up-in-librenms","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/server-logs-not-showing-up-in-librenms\/","title":{"rendered":"Server Logs not Showing up in LibreNMS"},"content":{"rendered":"\n<p>The problem:  Linux servers have been configured to send their local syslogs to LibreNMS, but are not showing up under the LibreNMS -&gt; DEVICE -&gt; Logs-&gt; Syslog<\/p>\n\n\n\n<p>After a bit of troubleshooting, found that the issue is the hostname being sent with the logs is different than what LibreNMS has for the device.  It appears that some Linux distributions will or can use an abbreviated system hostname.  There is a section in the LibreNMS docs about this <\/p>\n\n\n\n<p><a href=\"https:\/\/docs.librenms.org\/Extensions\/Syslog\/#matching-syslogs-to-hosts-with-different-names\">https:\/\/docs.librenms.org\/Extensions\/Syslog\/#matching-syslogs-to-hosts-with-different-names<\/a><\/p>\n\n\n\n<p>We can either do what the docs say, or we can set the host name in the rsyslog.conf file on each of the servers.<\/p>\n\n\n\n<p>Log into the server and open up<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo vi \/etc\/rsyslog.conf<\/pre>\n\n\n\n<p>At the very top, add the following line to set the hostname<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$LocalHostName host.server_name_fqdn.com<\/pre>\n\n\n\n<p>Save the file and restart rsyslog<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl restart rsyslog<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Refresh the page to verify the logs are showing up in LibreNMS.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>If you are still having issues, you may want to check the following<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>SELinux on LibreNMS <a href=\"https:\/\/www.incredigeek.com\/home\/selinux-links-and-commands\/\" data-type=\"post\" data-id=\"4812\">SELinux Audit Commands and Links<\/a>, <a href=\"https:\/\/www.incredigeek.com\/home\/setup-librenms-as-syslog-server\/\" data-type=\"post\" data-id=\"5260\">Setup LibreNMS as Syslog Server<\/a><\/li>\n\n\n\n<li>Firewall on LibreNMS Fr<a href=\"https:\/\/www.incredigeek.com\/home\/dual-zones-in-firewalld-public-private-or-external-internal\/\" data-type=\"post\" data-id=\"3812\">Dual Zones in Firewalld (Public\/Private or External\/Internal)<\/a>, <a href=\"https:\/\/www.incredigeek.com\/home\/install-librenms-on-centos\/\" data-type=\"post\" data-id=\"1800\">Install LibreNMS on CentOS<\/a><\/li>\n\n\n\n<li>Read the documentation entirely through<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>The problem: Linux servers have been configured to send their local syslogs to LibreNMS, but are not showing up under the LibreNMS -&gt; DEVICE -&gt; Logs-&gt; Syslog After a bit of troubleshooting, found that the issue is the hostname being &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/server-logs-not-showing-up-in-librenms\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[352],"tags":[353,7,234,134,389,565,564],"class_list":["post-5271","post","type-post","status-publish","format-standard","hentry","category-librenms","tag-librenms","tag-linux-2","tag-log","tag-monitoring","tag-nms","tag-rsyslog","tag-syslog"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=5271"}],"version-history":[{"count":3,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5271\/revisions"}],"predecessor-version":[{"id":5277,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5271\/revisions\/5277"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=5271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=5271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=5271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}