The first example you linked to, uses a modified version of the Berlin theme, which in return uses the headline from the miniframe theme. You can simply keep using the metropolis theme and add this headline.
What is left for you to do, is to decide which colours you want to have - just modify \setbeamercolor{section in head/foot}{fg=normal text.bg, bg=structure.fg}
\documentclass{beamer}
\usetheme{metropolis}
\makeatletter
\setbeamertemplate{headline}{%
\begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}{section in head/foot}
\vskip2pt\insertnavigation{\paperwidth}\vskip2pt
\end{beamercolorbox}%
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
\end{beamercolorbox}
}
\makeatother
\setbeamercolor{section in head/foot}{fg=normal text.bg, bg=structure.fg}
\begin{document}
\section{section 1}
\subsection{section name}
\begin{frame}
\frametitle{blub}
abc
\end{frame}
\begin{frame}
\frametitle{blub}
abc
\end{frame}
\section{section 2}
\begin{frame}
\frametitle{blub}
abc
\end{frame}
\section{section 3}
\begin{frame}
\frametitle{blub}
abc
\end{frame}
\end{document}

[In case you prefer the navigation bar from the second template you linked to, you can have a look into beamerouterthemesplit.sty and take the headline from there - but personally I don't think this will look good with metropolis, as the dark frametitle is already a quite dominant element and does not need the large headline from the split theme.]