= OMD = * [wiki:authenkey authen request] [[br]] * [wiki:request naemon query] [[br]] * [wiki:rrdtool rrdtool] [[br]] * [wiki:naemonlog write naemon log] [[br]] ref from [https://www.thruk.org/documentation/menu.html here] [[br]] To allow menu to open a link and show in thruk frame, we need to config allowed_frame_links in {{{ #!sh OMD[demo@a36aee5c525e]:~/etc/thruk$ pwd /omd/sites/demo/etc/thruk OMD[demo@a36aee5c525e]:~/etc/thruk$ cat thruk_local.conf allowed_frame_links = https://192.168.112.174:5688/ OMD[demo@a36aee5c525e]:~/etc/thruk$ }}} Create menu_local.conf under /etc/thruk/ {{{ #!sh OMD[demo@a36aee5c525e]:~/etc/thruk$ pwd /omd/sites/demo/etc/thruk OMD[demo@a36aee5c525e]:~/etc/thruk$ cat menu_local.conf do '/usr/share/thruk/menu.conf'; remove_item('Reports'); remove_item('General', 'Panorama View'); remove_item('System', 'Configuration'); add_section('name' => 'General'); add_link('name' => 'Home', 'href' => '/thruk/main.html'); add_link('name' => 'Logout', 'href' => $c->config->{'logout_link'}, 'target' => "_parent") if($c->stash->{'cookie_auth'}); add_section('name' => 'Current Status'); add_link('name' => 'Hosts', 'href' => '/thruk/cgi-bin/status.cgi?hostgroup=all&style=hostdetail'); add_link('name' => 'Services', 'href' => '/thruk/cgi-bin/status.cgi?host=all'); add_search('name' => 'Quick Search:'); add_section('name' => 'Logs'); add_link('name' => 'Event Log', 'href' => '/thruk/cgi-bin/showlog.cgi'); add_link('name' => "Test submenu", 'href' => 'https://192.168.112.174:5688/demo/test3.html'); add_section('name' => 'System'); add_link('name' => 'Configuration', 'href' => '/thruk/cgi-bin/config.cgi') if has_role('authorized_for_system_information', 'authorized_for_configuration_information'); #insert_item('NewItem', { 'href' => '/thruk/frame.html/http://172.17.0.2', 'name' => 'Company' }, 'target' => '_parent'); OMD[demo@a36aee5c525e]:~/etc/thruk$ }}} To allow only some contact group or user authorized_for_configuration_information to see some menu/submenu {{{ #!sh [demo@669ee2143112 thruk]$ pwd /omd/sites/demo/etc/thruk [demo@669ee2143112 thruk]$ cat menu_local.conf remove_item('Reports'); remove_item('General', 'Panorama View'); remove_item('System', 'Configuration'); add_section('name' => 'General'); add_link('name' => 'Home', 'href' => '/thruk/main.html'); add_link('name' => 'Logout', 'href' => $c->config->{'logout_link'}, 'target' => "_parent") if($c->stash->{'cookie_auth'}); add_section('name' => 'Current Status'); add_link('name' => 'Hosts', 'href' => '/thruk/cgi-bin/status.cgi?hostgroup=all&style=hostdetail'); add_link('name' => 'Services', 'href' => '/thruk/cgi-bin/status.cgi?host=all'); add_search('name' => 'Quick Search:'); add_section('name' => 'Logs'); add_link('name' => 'Event Log', 'href' => '/thruk/cgi-bin/showlog.cgi'); add_link('name' => "Trac 10", 'href' => 'https://172.17.0.2/demo/test3.html'); add_section('name' => 'System'); add_link('name' => 'Configuration', 'href' => '/thruk/cgi-bin/config.cgi') if has_role('authorized_for_system_information', 'authorized_for_configuration_information'); insert_item('NewItem', { 'href' => 'https://172.17.0.2/demo/test2.html', 'name' => 'Company' }, 'target' => '_parent'); #if(has_group('demo')) { # insert_item('Demo Only', { 'href' => 'https://172.17.0.2/demo/test3.html', 'name' => 'Admin Link' }); #} if(has_role('authorized_for_configuration_information')) { insert_item('Auth configure', { 'href' => 'https://172.17.0.2/demo/test3.html', 'name' => 'Conf Link' }); } [demo@669ee2143112 thruk]$ }}} Since the above test3.html and test2.html were refer from menu we can put those files in {{{ [demo@669ee2143112 www]$ tree /omd/sites/demo/var/www/ /omd/sites/demo/var/www/ |-- test2.html `-- test3.html 0 directories, 3 files }}}