{"id":955,"date":"2013-05-27T15:48:31","date_gmt":"2013-05-27T05:48:31","guid":{"rendered":"http:\/\/howden.net.au\/thowden\/?p=955"},"modified":"2013-05-27T15:48:31","modified_gmt":"2013-05-27T05:48:31","slug":"sme-server-as-a-nagios-nrpe-client-only","status":"publish","type":"post","link":"https:\/\/howden.net.au\/thowden\/2013\/05\/sme-server-as-a-nagios-nrpe-client-only\/","title":{"rendered":"SME Server as a Nagios NRPE Client only"},"content":{"rendered":"<p>If you are wanting to install Nagios on an SME Server version 8 then you will probably start with the Wiki Contribs page for a Nagios Server install. <a href=\"http:\/\/wiki.contribs.org\/Nagios\">http:\/\/wiki.contribs.org\/Nagios<\/a><\/p>\n<p>Which is going to lead you down a path of installing a complete Nagios Server assuming you overcome the issues with those instructions.<\/p>\n<p>But if you have a Nagios Server elsewhere and you want to just add the SME Server as a client then a different set of instructions can be found in the forums.<\/p>\n<p><a href=\"http:\/\/forums.contribs.org\/index.php\/topic,48587.msg241615.html#msg241615\">http:\/\/forums.contribs.org\/index.php\/topic,48587.msg241615.html#msg241615<\/a><\/p>\n<p>Which is really helpful but is missing a couple of key points for a complete set of instructions. So here is a re-write of that instruction set.<\/p>\n<h2>NRPE SME Server 8 Installation<\/h2>\n<p>1. Configure the dag repository<\/p>\n<p>The following command will configure the dag repository on SME Server.<\/p>\n<p>[text]<\/p>\n<p>\/sbin\/e-smith\/db yum_repositories set dag repository<br \/>\n Name &#8216;Dag &#8211; EL5&#8217;<br \/>\n BaseURL &#8216;&lt;a href=&quot;http:\/\/apt.sw.be\/redhat\/el5\/en\/&quot; target=&quot;_blank&quot;&gt;http:\/\/apt.sw.be\/redhat\/el5\/en\/&lt;\/a&gt;$basearch\/dag&#8217;<br \/>\n EnableGroups no<br \/>\n GPGCheck yes<br \/>\n GPGKey &lt;a href=&quot;http:\/\/dag.wieers.com\/packages\/RPM-GPG-KEY.dag.txt&quot; target=&quot;_blank&quot;&gt;http:\/\/dag.wieers.com\/packages\/RPM-GPG-KEY.dag.txt&lt;\/a&gt;<br \/>\n Visible no<br \/>\n Exclude freetype,htop,iptraf,rsync,syslinux<br \/>\n status disabled<\/p>\n<p>[\/text]<\/p>\n<p>2. After adding it to the database we have to update the changes to the configuration file:<\/p>\n<p>[text]signal-event yum-modify[\/text]<\/p>\n<p>3. Then run this to enable the repo<\/p>\n<p>[text]<\/p>\n<p>\/usr\/bin\/yum &#8211;enablerepo=dag install<br \/>\n nagios-plugins<br \/>\n nagios-plugins-setuid<br \/>\n perl-Config-Tiny<br \/>\n perl-Class-Accessor<\/p>\n<p>[\/text]<\/p>\n<p>4. Copy nrpe rpm&#8217;s<\/p>\n<p>Current download for the files are:<\/p>\n<p><a href=\"http:\/\/pkgs.repoforge.org\/nagios\/nagios-3.2.1-5.el5.rf.i386.rpm\">http:\/\/pkgs.repoforge.org\/nagios\/nagios-3.2.1-5.el5.rf.i386.rpm<\/a><\/p>\n<p><a href=\"http:\/\/pkgs.repoforge.org\/nagios-nrpe\/nagios-nrpe-2.5.2-1.el5.rf.i386.rpm\">http:\/\/pkgs.repoforge.org\/nagios-nrpe\/nagios-nrpe-2.5.2-1.el5.rf.i386.rpm<\/a><\/p>\n<p><a href=\"http:\/\/pkgs.repoforge.org\/nagios-nrpe\/nagios-plugins-nrpe-2.5.2-1.el5.rf.i386.rpm\">http:\/\/pkgs.repoforge.org\/nagios-nrpe\/nagios-plugins-nrpe-2.5.2-1.el5.rf.i386.rpm<\/a><\/p>\n<p>5.\u00a0Install the nrpe rpm&#8217;s<\/p>\n<p>[text]<\/p>\n<p>yum localinstall nagios-3.2.1-5.el5.rf.i386.rpm<br \/>\n yum localinstall nagios-nrpe-2.5.2-1.el5.rf.i386.rpm<br \/>\n yum localinstall nagios-plugins-nrpe-2.5.2-1.el5.rf.i386.rpm<\/p>\n<p>[\/text]<\/p>\n<p>6. Modify the nrpe.cfg file to allow the external ip of your Nagios server\u00a0 (swap vim for your favourite editor)<\/p>\n<p>[text]<\/p>\n<p>vim \/etc\/nagios\/nrpe.cfg<\/p>\n<p>[\/text]<\/p>\n<p>the allowed_hosts parameter is already in the file, remove the # from the start of the line and add your nagios server ip<\/p>\n<p>[text]<\/p>\n<p>allowed_hosts=127.0.0.1,nagios.server.ip.here<\/p>\n<p>[\/text]<\/p>\n<p>Save the file and exit.<\/p>\n<p>7. Add the service<\/p>\n<p>[text]<\/p>\n<p>cd \/etc\/rc7.d<\/p>\n<p>cp -s \/etc\/init.d\/nrpe S95nrpe<\/p>\n<p>[\/text]<\/p>\n<p>8. Port forward 5666 to localhost (swap vim for your favourite editor)<\/p>\n<p>a)<\/p>\n<p>[text]<\/p>\n<p>mkdir -p \/etc\/e-smith\/templates-custom\/etc\/hosts.allow\/<\/p>\n<p>[\/text]<\/p>\n<p>(if you get an error it means the directory already exists.)<\/p>\n<p>b)<\/p>\n<p>[text]<\/p>\n<p>vim \/etc\/e-smith\/templates-custom\/etc\/hosts.allow\/nrpe<\/p>\n<p>[\/text]<\/p>\n<p>and add the following lines to the nrpe file, adding your nagios server ip<\/p>\n<p>[text]<\/p>\n<p>{<br \/>\n $OUT=&quot;nrpe: &quot; . ($nrpe{HostsAllow} ? $nrpe{HostsAllow} : &quot;127.0.0.1 nagios.server.ip.here&quot; );<br \/>\n }<\/p>\n<p>[\/text]<\/p>\n<p>Save the file and exit.<\/p>\n<p>9. Configure the new template<\/p>\n<p>[text]<\/p>\n<p>expand-template \/etc\/hosts.allow<\/p>\n<p>[\/text]<\/p>\n<p>10. Start NRPE<\/p>\n<p>[text]<\/p>\n<p>service nrpe restart<\/p>\n<p>[\/text]<\/p>\n<p>And then off to your Nagios server to add the new SME Server as a client.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are wanting to install Nagios on an SME Server version 8 then you will probably start with the Wiki Contribs page for a Nagios Server install. http:\/\/wiki.contribs.org\/Nagios Which is going to lead you down a path of installing a complete Nagios Server assuming you overcome the issues with those instructions. But if you [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,16,1],"tags":[],"class_list":["post-955","post","type-post","status-publish","format-standard","hentry","category-nagios","category-sme-server","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/posts\/955","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/comments?post=955"}],"version-history":[{"count":0,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/posts\/955\/revisions"}],"wp:attachment":[{"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/media?parent=955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/categories?post=955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/howden.net.au\/thowden\/wp-json\/wp\/v2\/tags?post=955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}