{"id":3147,"date":"2011-08-17T01:02:57","date_gmt":"2011-08-17T07:02:57","guid":{"rendered":"http:\/\/gregsowell.com\/?p=3147"},"modified":"2011-08-12T15:04:10","modified_gmt":"2011-08-12T21:04:10","slug":"send-test-syslog-message","status":"publish","type":"post","link":"https:\/\/gregsowell.com\/?p=3147","title":{"rendered":"Send Test Syslog Message"},"content":{"rendered":"<p>I have test emails send daily, but what I failed to test was my syslog server.  Now that I&#8217;ve had it brick on me, I&#8217;m now doing daily test syslog messages.<\/p>\n<p>I use <a href=\"http:\/\/www.phpclasses.org\/browse\/file\/12157.html\">this PHP script<\/a>.  If you can&#8217;t happen to pull it from that site, here&#8217;s the file to download:<div class=\"wp-block-button\">\n<a  data-e-Disable-Page-Transition=\"true\" class=\"dlm-download-link dlm-download-default wp-block-button__link wp-element-button\" title=\"\" href=\"https:\/\/gregsowell.com?download=5705&amp;tmstv=1784666612\" rel=\"nofollow\" id=\"download-link-5705\" data-redirect=\"false\" >\n\tsyslog.zip\t(1406 downloads\t)\n<\/a>\n<\/div>\n.<\/p>\n<p>I then use this simple PHP script to send the message:<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">&lt;?php\r\nrequire_once(&#039;\/root\/syslog-check\/syslog.php&#039;);\r\n$syslog = new Syslog();\r\n$syslog-&gt;Send(&#039;1.1.1.1&#039;, &#039;syslog test message&#039;);\r\n?&gt;<\/code><\/pre>\n<p>I then have this setup to run as a cron job on my cacti server:<br \/>\n<a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2011\/08\/11.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2011\/08\/11.png\" alt=\"\" title=\"11\" width=\"420\" height=\"559\" class=\"aligncenter size-full wp-image-3148\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2011\/08\/11.png 420w, https:\/\/gregsowell.com\/wp-content\/uploads\/2011\/08\/11-225x300.png 225w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/><\/a><br \/>\n<a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2011\/08\/12.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2011\/08\/12.png\" alt=\"\" title=\"12\" width=\"556\" height=\"529\" class=\"aligncenter size-full wp-image-3149\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2011\/08\/12.png 556w, https:\/\/gregsowell.com\/wp-content\/uploads\/2011\/08\/12-300x285.png 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/a><\/p>\n<p>Last, I setup a match script in cacti&#8217;s syslog to match &#8220;syslog test message&#8221;.  Simple enough \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have test emails send daily, but what I failed to test was my syslog server. Now that I&#8217;ve had it brick on me,\u2026<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,13],"tags":[],"class_list":["post-3147","post","type-post","status-publish","format-standard","hentry","category-cacti","category-server"],"_links":{"self":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/3147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3147"}],"version-history":[{"count":6,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/3147\/revisions"}],"predecessor-version":[{"id":3155,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/3147\/revisions\/3155"}],"wp:attachment":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}