If you create “html/includes/navbar-custom.inc.php” then “navbar.inc.php” will include that file automatically.
navbar-custom.inc.php should set some values in the $navbar array, indicating how Observium should render extra top level or sub-level menus.
You’ll them need to create the necessary files and/or directories in “html/pages” so the links will work correctly.
e.g. we add nfsen and some other custom stuff in using the below,
$ cat html/includes/navbar-custom.inc.php
<?php
if ($_SESSION['userlevel'] >= '5' && $config['nfsen_enable'] == 1)
{
$navbar['flows'] = array('url' => '#', 'icon' => 'custom-icon-flow', 'title' => 'Flows');
$navbar['flows']['entries'][] = array('url' => '/flows/source=nfsen', 'image' => 'images/icons/nfsen.png', 'title' => nicecase('nfsen'));
}
if ($_SESSION['userlevel'] >= '5' && $config['thousandeyes']['enable'] == 1)
{
$navbar['thousandeyes'] = array('url' => '#', 'icon' => 'custom-icon-thousandeyes', 'title' => 'Thousand Eyes');
$navbar['thousandeyes']['entries'][] = array('url' => '/thousandeyes/api=agents', 'image' => 'images/icons/thousandeyes.png', 'title' => nicecase('Agents'));
$navbar['thousandeyes']['entries'][] = array('url' => '/thousandeyes/api=tests', 'image' => 'images/icons/thousandeyes.png', 'title' => nicecase('Tests'));
$navbar['thousandeyes']['entries'][] = array('url' => '/thousandeyes/api=alerts', 'image' => 'images/icons/thousandeyes.png', 'title' => nicecase('Alerts'));
}
$navbar['dashboards'] = array('url' => '#', 'icon' => 'oicon-light-bulb', 'title' => 'Dashboards');
$navbar['dashboards']['entries'][] = array('url' => '/dashboards/dashboard=overview', 'image' => 'images/icons/overview.png', 'title' => nicecase('Overview'));
$navbar[‘dashboards’]['entries'][] = array('url' => '/dashboards/dashboard=top', 'image' => 'images/icons/topx.png', 'title' => nicecase('Top X'));
// EOF