{"id":761,"date":"2011-07-27T09:01:32","date_gmt":"2011-07-27T14:01:32","guid":{"rendered":"http:\/\/it.thelibrarie.com\/weblog\/?p=761"},"modified":"2011-07-27T11:15:34","modified_gmt":"2011-07-27T16:15:34","slug":"configure-nagios-on-ubuntu-server","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2011\/07\/configure-nagios-on-ubuntu-server\/","title":{"rendered":"Configure Nagios on Ubuntu Server"},"content":{"rendered":"<p>I&#8217;m assuming that you&#8217;ve already read the post on installing nagios AND have successfully installed nagios on your LAMP server.  I have recently wiped out the 9.04-upgraded-to-10.04.1 server in favor of a fresh install of 10.04.2LTS.  I followed my own guide and nagios is installed and running on production equipment.<\/p>\n<p>I needed to add a new user to be able to access all the same admin functionality of the nagios website.<br \/>\nCreate the login for apache:<\/p>\n<blockquote><p><code>htpasswd \/usr\/local\/nagios\/etc\/htpasswd.users USERNAME<\/code><br \/>\nPASSWORD<br \/>\nPASSWORD<\/p><\/blockquote>\n<p>Add the user to the contacts list:<\/p>\n<blockquote><p><code>nano \/usr\/local\/nagios\/etc\/objects\/contacts.cfg<\/code><br \/>\ndefine contact{<br \/>\n  contact_name  USERNAME<br \/>\n  use  generic-contact<br \/>\n  alias  FULL NAME<br \/>\n  email  EMAIL@DOMAIN.TLD<br \/>\n  }<br \/>\nAdd the USERNAME after &#8220;nagiosadmin&#8221; under the define contactgroup{ area<br \/>\nNote, you will need to add a &#8220;, &#8221; after nagiosadmin<\/p><\/blockquote>\n<p>Restart Nagios to re-read the configuration:<\/p>\n<blockquote><p><code>\/etc\/init.d\/nagios restart<\/code><\/p><\/blockquote>\n<p>I would like to make a parent of an object (switch parent of server, or server hosting virtual machines etc)<\/p>\n<blockquote><p>define host{<br \/>\n  use  windows-server<br \/>\n  host_name  HOSTNAME<br \/>\n  alias  LONGNAME<br \/>\n  address  IPADDRESS<br \/>\n  parents  SERVER_OR_SWITCH_NAME &#8211; this must have a valid .cfg file already created<br \/>\n  hostgroups  SERVERGROUP1, SERVERGROUP3, ETC<\/p><\/blockquote>\n<p>Add Icons to Nagios Network Map<br \/>\nUpload your png file to \/usr\/local\/nagios\/share\/images\/logos\/<br \/>\nInstall the PNG to GD2 application:<br \/>\n<code>apt-get install libgd-tools<\/code><br \/>\nConvert your PNG to a GD2:<br \/>\n<code>pngtogd2 PNGFILE.png PNGFILE.gd2 cs 1<\/code><\/p>\n<p>Create the host image config file:<br \/>\n<code>nano \/usr\/local\/nagios\/etc\/objects\/hostimages.cfg<\/code><\/p>\n<blockquote><p>define hostextinfo{<br \/>\n  host_name  HOSTNAME, HOSTNAME2, ETC<br \/>\n  # notes_url  http:\/\/sitefornoteshere<br \/>\n  icon_image  FILENAME.png<br \/>\n  icon_image_alt 0  ALTNAMEOFDEVICE<br \/>\n  vrml_image  FILENAME.png<br \/>\n  statusmap_image  FILENAME.gd2<br \/>\n  }<\/p><\/blockquote>\n<p>Restart Nagios:<br \/>\n<code>\/etc\/init.d\/nagios restart<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m assuming that you&#8217;ve already read the post on installing nagios AND have successfully installed nagios on your LAMP server. I have recently wiped out the 9.04-upgraded-to-10.04.1 server in favor of a fresh install of 10.04.2LTS. I followed my own guide and nagios is installed and running on production equipment. I needed to add a &hellip; <a href=\"https:\/\/it.thelibrarie.com\/weblog\/2011\/07\/configure-nagios-on-ubuntu-server\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Configure Nagios on Ubuntu Server<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-761","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/comments?post=761"}],"version-history":[{"count":2,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/761\/revisions"}],"predecessor-version":[{"id":767,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/761\/revisions\/767"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}