

\documentclass{beamer}

\mode<presentation>
{
  \usetheme{Warsaw}
  \setbeamercovered{transparent}
}

\usepackage[french]{babel}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}

\usepackage{amsmath}
\setbeamertemplate{navigation symbols}{}
\usepackage{graphicx}

\hypersetup{
	pdfauthor={Rémi Laurent\\~~remi.laurent@fsugar.be}
	pdftitle={Présentation de Nagios}
}

\AtBeginSection[]
{
	\begin{frame}<beamer>
	\tableofcontents[currentsection]
	\end{frame}
}


\title{Présentation de Nagios}

\author{Rémi Laurent\\~~remi.laurent@fsugar.be}

\institute{ \includegraphics[width=4cm]{img/logo.png}\\ \href{http://www.fsugar.be/}{http://www.fsugar.be/}}

\begin{document}
\frame{\titlepage}



\begin{color}{black}

	\begin{frame}
	
	\frametitle{Nagios ?}
	\begin{itemize}
\item système de monitoring:
  \begin{itemize}
    \item services réseaux
    \item paramètres "vitaux"
  \end{itemize}
  \item notification
  \item gestion des incidents
  \item prises d'actions
  \item ...
\end{itemize}


\end{frame}
\end{color}


\begin{color}{black}

		\begin{frame}
		\frametitle{Vocabulaire}
		\begin{description}
		
			\item[Probe ]  sonde
		
			\item[Host ]  une machine (IP / hostname)
		
			\item[Service ]  HTTP, SSH, ...
		
			\item[Notification ]  alertes (mail, SMS, Web, ...)
		
			\item[Service Group ]  FSUGAr public
		
			\item[Host Group ]  GUIMAUVE
		
			\item[Objet Nagios ]  define object\_name \{ ... \}
		
		\end{description}

\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	
	\frametitle{Relations de base}
	\center
\includegraphics[width=11cm]{img/nagios1.pdf}


\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	
	\frametitle{Relations "plus complètes"}
	\center
\includegraphics[width=11cm]{img/nagios2.pdf}


\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	
	\frametitle{Relations "presque complètes"}
	\center
\includegraphics[width=11cm]{img/nagios3.pdf}


\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	[fragile]
	\frametitle{Définition de commande}
	\center
\begin{verbatim}
  # Debian -> /etc/nagios-plugins/config/
  # copié de  /usr/share/nagios-plugins/ ucf(1)
  define command {
    command_name    check_ssh
    command_line    $PLUGINS/check_ssh '$HOSTADDRESS$'
  }
  define command {
    command_name    check_ssh_port
    command_line    $PLUGINS/check_ssh -p '$ARG1$' \
      '$HOSTADDRESS$'
  }
\end{verbatim}


\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	[fragile]
	\frametitle{Configuration commandes}
	\center
\begin{verbatim}
  apt.cfg       ftp.cfg       mysql.cfg    real.cfg
  breeze.cfg    games.cfg     netware.cfg  rpc-nfs.cfg
  dhcp.cfg      hppjd.cfg     news.cfg     snmp.cfg
  disk.cfg      http.cfg      nt.cfg       ssh.cfg
  disk-smb.cfg  ifstatus.cfg  ntp.cfg      tcp_udp.cfg
  dns.cfg       ldap.cfg      pgsql.cfg    telnet.cfg
  dummy.cfg     load.cfg      ping.cfg     users.cfg
  flexlm.cfg    mail.cfg      procs.cfg    vsz.cfg
  fping.cfg     mrtg.cfg      radius.cfg

  grep command_name /etc/nagios-plugins/config/* | wc -l
  152
\end{verbatim}


\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	[fragile]
	\frametitle{Commandes disponibles (près de 70 par défaut)}
	\center
\begin{verbatim}
  check_apt           check_ircd         check_pop
  check_bgpstate      check_jabber       check_procs
  check_breeze        check_ldap         check_radius
  check_by_ssh        check_ldaps        check_real
  check_clamd         check_linux_raid   check_rpc
  check_cluster       check_load         check_sensors
  check_dhcp          check_log          check_simap
  check_dig           check_mailq        check_smtp
  check_disk          check_mrtg         check_snmp
  check_disk_smb      check_mrtgtraf     check_spop
  check_dns           check_mysql        check_ssh
  check_dummy         check_mysql_query  check_ssmtp
  check_file_age      check_nagios       check_swap
  check_flexlm        check_nntp         check_tcp
  check_fping         check_nntps        check_time
  check_ftp           check_nt           check_udp
  ...                 ...                ...
\end{verbatim}


\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	[fragile]
	\frametitle{Définition de service 1}
	\center
\begin{verbatim}
  define service {
    use                     generic-service
    host_name               trappe.fifi.be localhost
    service_description     SSH Server
    check_command           check_ssh
  }
\end{verbatim}


\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	[fragile]
	\frametitle{Définition de service 2}
	\center
\begin{verbatim}
  define service {
    use                     generic-service
    host_name               trappe.fifi.be localhost
    service_description     SSH Server
    check_command           check_ssh_port!2222
  }
\end{verbatim}


\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	[fragile]
	\frametitle{Définition d'un service template}
	\center
\begin{verbatim}
  # Debian -> /etc/nagios3/conf.d/generic-services.cfg
  define service{
    name                            generic-service
    active_checks_enabled           1
    passive_checks_enabled          1
    parallelize_check               1
    obsess_over_service             1
    check_freshness                 0
    notifications_enabled           1
    flap_detection_enabled          1
    process_perf_data               1
    retain_status_information       1
    retain_nonstatus_information    1
    notification_interval           0
    is_volatile                     0
    ...
\end{verbatim}



\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	[fragile]
	\frametitle{Définition d'un service template (suite)}
	\center
\begin{verbatim}
    ...
    check_period                    24x7
    normal_check_interval           5
    retry_check_interval            1
    max_check_attempts              4
    notification_period             24x7
    notification_options            w,u,c,r
    contact_groups                  admins
    register                        0 ; << IMPORTANT
  }
\end{verbatim}


\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	[fragile]
	\frametitle{Définition d'un host}
	\center
\begin{verbatim}
  define host {
    host_name       gorcy.fifi.be
    alias           Gateway Qube @ Gorcy
    address         gorcy.fifi.be
    use             generic-host
    parents         hetzner-hop1
  }
\end{verbatim}


\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	[fragile]
	\frametitle{Définition d'un host template}
	\center
\begin{verbatim}
  # Debian -> /etc/nagios3/conf.d/generic-host.cfg
  define host {
    name                            generic-host
    notifications_enabled           1
    flap_detection_enabled          1
    process_perf_data               1
    retain_status_information       1
    retain_nonstatus_information    1
    check_command                   check-host-alive
    max_check_attempts              10
    notification_interval           0
    notification_period             24x7
    notification_options            d,u,r
    contact_groups                  admins
    register                        0       ; << IMPORTANT
  }
\end{verbatim}


\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	[fragile]
	\frametitle{Définition d'un servicegroup}
	\center
\begin{verbatim}
  define servicegroup {
    servicegroup_name   FSUGAr public
    members             www.fsugar.be,SMTP Server, \
                        www.fsugar.be,Main Vhost, \
                        orval.fsugar.be,DNS fsugar.be zone
    #servicegroup_members   another service group
 }
\end{verbatim}


\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	[fragile]
	\frametitle{Définition d'un hostgroup}
	\center
\begin{verbatim}
  define hostgroup {
    hostgroup_name  GUIMAUVE
    alias           GUIMAUVE VMs and Dom0
    members         trappe.fifi.be localhost,\
                    rulles.fsugar.be internal, \
                    stella.planetemultimedia.be, \
                    tremens.transport-duchesne.be, \
                    orval.fsugar.be
  }
\end{verbatim}


\end{frame}
\end{color}


\begin{color}{black}

		\begin{frame}
		\frametitle{Autres objets}
		\begin{description}
		
			\item[contact ]  ...
		
			\item[contactgroup ]  ...
		
			\item[hostextinfo ]  information étendue pour un host/hostgroup
		
			\item[timeperiod ]  période de temps (jour, semaine, ...)
		
			\item[servicedependency ]  host1,svc1 dépend de host2,svc2 != parent
		
			\item[Escalation ]  escalade d'une alerte
		
		\end{description}

\end{frame}
\end{color}


\begin{color}{black}

	\begin{frame}
	
	\frametitle{Démonstration / Exploration}
	\begin{center}
  {\Large Démonstration}\\
  ...\\
  Déjà ?\\
  ...\\
  oui, {\Large Déjà !}
\end{center}


\end{frame}
\end{color}


\begin{color}{black}

		\begin{frame}
		\frametitle{Quelques ressources}
		\begin{itemize}
		
			\item Site officiel \\ \href{http://nagios.org/}{http://nagios.org/}
		
			\item Documentation/Bible \\ \href{http://nagios.sourceforge.net/docs/3_0/}{http://nagios.sourceforge.net/docs/3\_0/}
		
			\item Solution clé sur porte \\ \href{http://fannagioscd.sourceforge.net/drupal/}{Fully Automated Nagios}
		
			\item Pour les anglophobes \\ \href{http://nagios.manubulon.com/traduction/fr_2.5/index.html}{Nagios 2 Doc (FR)}
		
			\item Écrire ses propres probes \\ \href{http://nagiosplug.sourceforge.net/developer-guidelines.html}{Developer Guidelines}
		
		\end{itemize}

\end{frame}
\end{color}



\end{document}

