Changes between Version 2 and Version 3 of OMD


Ignore:
Timestamp:
08/18/21 16:05:09 (3 years ago)
Author:
krit
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OMD

    v2 v3  
    33 * [wiki:rrdtool rrdtool]
    44 ref from [https://www.thruk.org/documentation/menu.html here]
     5
     6To allow menu to open a link and show in thruk frame, we need to config allowed_frame_links in
     7{{{
     8#!sh
     9OMD[demo@a36aee5c525e]:~/etc/thruk$ pwd
     10/omd/sites/demo/etc/thruk
     11OMD[demo@a36aee5c525e]:~/etc/thruk$ cat thruk_local.conf
     12allowed_frame_links = https://171.100.112.174:5688/
     13OMD[demo@a36aee5c525e]:~/etc/thruk$
     14
     15}}}
     16
    517
    618Create menu_local.conf under /etc/thruk/
     
    3648OMD[demo@a36aee5c525e]:~/etc/thruk$
    3749}}}
     50
     51
     52To allow only some contact group or user authorized_for_configuration_information
     53{{{
     54#!sh
     55[demo@669ee2143112 thruk]$ pwd
     56/omd/sites/demo/etc/thruk
     57[demo@669ee2143112 thruk]$ cat menu_local.conf
     58remove_item('Reports');
     59remove_item('General', 'Panorama View');
     60remove_item('System', 'Configuration');
     61
     62add_section('name' => 'General');
     63  add_link('name' => 'Home', 'href' => '/thruk/main.html');
     64  add_link('name' => 'Logout', 'href' => $c->config->{'logout_link'}, 'target' => "_parent") if($c->stash->{'cookie_auth'});
     65
     66add_section('name' => 'Current Status');
     67  add_link('name' => 'Hosts',                 'href' => '/thruk/cgi-bin/status.cgi?hostgroup=all&style=hostdetail');
     68  add_link('name' => 'Services',              'href' => '/thruk/cgi-bin/status.cgi?host=all');
     69  add_search('name' => 'Quick Search:');
     70
     71add_section('name' => 'Logs');
     72  add_link('name' => 'Event Log', 'href' => '/thruk/cgi-bin/showlog.cgi');
     73  add_link('name' => "Trac 10",  'href' => 'https://172.17.0.2/demo/test3.html');
     74
     75add_section('name' => 'System');
     76  add_link('name' => 'Configuration',     'href' => '/thruk/cgi-bin/config.cgi') if has_role('authorized_for_system_information', 'authorized_for_configuration_information');
     77 
     78insert_item('NewItem', { 'href' => 'https://172.17.0.2/demo/test2.html', 'name' => 'Company' }, 'target' => '_parent');
     79
     80
     81
     82#if(has_group('demo')) {
     83#  insert_item('Demo Only', { 'href' => 'https://172.17.0.2/demo/test3.html', 'name' => 'Admin Link' });
     84#}
     85
     86if(has_role('authorized_for_configuration_information')) {
     87  insert_item('Auth configure', { 'href' => 'https://172.17.0.2/demo/test3.html', 'name' => 'Conf Link' });
     88}
     89
     90[demo@669ee2143112 thruk]$
     91}}}