aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/app/snmp.config
blob: b66ef5d7dfc807460a0203ada8b78b7bf0a40af7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
%% Example snmp (node) config file
%% [{snmp, [snmp_app()]
%% snmp_app() -> {agent, agent_opts()} | {manager, manager_opts()}
%% 
%% -- Agent types --
%% agent_opts() -> [agent_opt()]
%% agent_opt()  -> {agent_type,        agent_type()} |
%%                 {agent_verbosity,   verbosity()} |
%%                 {versions,          versions()} |
%%                 {priority,          atom()} |
%%                 {set_mechanism,     module()} |
%%                 {authentication_service, module()} |
%%                 {multi_threaded,    bool()} | 
%%                 {db_dir,            dir()} |
%%                 {local_db,          local_db_opts()} |
%%                 {net_if,            net_if_opts()} |
%%                 {mibs,              [string()]} |
%%                 {mib_storage,       mib_storage()} |
%%                 {mib_server,        mib_server_opts()} |
%%                 {audit_trail_log,   audit_trail_log_opts()} |
%%                 {error_report_mod,  module()} |
%%                 {note_store,        note_store_opts()} | 
%%                 {symbolic_store,    symbolic_store_opts()} |
%%                 {config,            config_opts()}
%%                 {supervisor,        supervisor_opts()}
%% agent_type() -> master | sub
%% local_db_opts() -> [local_db_opt()]
%% local_db_opt() -> {repair, repair()} |
%%                   {auto_save, auto_save()} |
%%                   {verbosity, verbosity()}
%% repair() -> true | false | force
%% auto_save() -> integer() | infinity
%% net_if_opts() -> [net_if_opt()]
%% net_if_opt() -> {module,    atom()} | 
%%                 {verbosity, verbosity()} | 
%%                 {options,   net_if_options()}
%% net_if_options() -> [net_if_option()]
%% net_if_option() -> Note that these are basically dependant on which net-if
%%                    module is beeing used, but the options described here
%%                    are the ones that snmp_net_if (the default value for 
%%                    the module option) handles:
%%                    {bind_to,   bool()} |
%%                    {recbuf,    integer()} |
%%                    {no_reuse,  bool()}
%%                    {req_limit, integer() | infinity}
%% mib_server_opts() -> [mib_server_opt()]
%% mib_server_opt() -> {mibentry_override,  bool()} |
%%                     {trapentry_override, bool()} |
%%                     {verbosity,          verbosity()}
%% mib_storage() -> ets | 
%%                  {dets, dir()} | {dets, dir(), action()} |
%%                  {mnesia, [node()]} |
%%                  {mnesia, [node()], action()} |
%% action() -> clear | keep
%% symbolic_store_opts() -> [symbolic_store_opt()]
%% symbolic_store_opt() -> {verbosity, verbosity()}
%% supervisor_opts() -> [supervisor_opt()]
%% supervisor_opt()  -> {verbosity, verbosity()}
%% config_opts() -> [config_opt()]
%% config_opt()  -> {dir, dir()} | 
%%                  {force_load, bool()} | 
%%                  {verbosity, verbosity()}
%%                  
%% 
%% -- Manager types --
%% manager_options() -> [manager_option()]
%% manager_option() -> {net_if,          mgr_net_if_opts()} |
%%                     {note_store,      note_store_opts()} | 
%%                     {config,          mgr_config_opts()}  |
%%                     {mibs,            [string()]}   | 
%%                     {priority,        priority()}   |
%%                     {audit_trail_log, audit_trail_log_opts()} | 
%%                     {versions,        versions()}
%% mgr_net_if_opts() -> [mgr_net_if_opt()]
%% mgr_net_if_opt() -> {module,    atom()} |
%%                     {verbosity, verbosity()} |
%%                     {options,   mgr_net_if_options()}
%% mgr_net_if_options() -> [mgr_net_if_option()]
%% mgr_net_if_option() -> Note that these are basically dependant on which 
%%                        net-if module is beeing used, but the options 
%%                        described here are the ones of the snmpm_net_if 
%%                        (the default value for the module option):
%%                        {recbuf,   integer()} |
%%                        {bind_to,  bool()} |
%%                        {no_reuse, bool()}
%% mgr_config_opts() -> {dir, dir()} |
%%                      {verbosity, verbosity()}
%% 
%% -- Common types --
%% module() -> atom()
%% verbosity() -> silence | info | log | debug | trace
%% versions() -> [version()]
%% version() -> v1 | v2 | v3
%% audit_trail_log_opts() -> [audit_trail_log_opt()]
%% audit_trail_log_opt() -> {type,   atl_type()} |
%%                          {dir,    atl_dir()} |
%%                          {size,   atl_size()} |
%%                          {repair, atl_repair()}
%% atl_type()   -> read | write | read_write
%% atl_dir()    -> dir()
%% atl_size()   -> {max_bytes(), max_files()}
%% atl_repair() -> true | false | truncate
%% max_bytes()  -> integer()
%% max_files()  -> integer()
%% dir()        -> string()
%% note_store_opts() -> [note_store_opt()]
%% note_store_opt() -> {verbosity, verbosity()} |
%%                     {timeout, integer()} 
%% 

[{snmp, 
  [
   {agent, 
    [{agent_type,      master}, 
     {agent_verbosity, trace},
     {priority,        normal},
     {versions,        [v1,v2,v3]},
     {multi_threaded,  true},
     {config,          [{verbosity, trace},
                        {dir, "/ldisk/snmp/agent/conf"},
                        {force_load, true}]},
     {db_dir,          "/ldisk/snmp/agent/db"},
     {local_db,        [{repair,    true},
                        {verbosity, silence}]},
     {net_if,
      [{module,    snmp_net_if},
       {verbosity, log}, 
       {options,   [{recbuf, 10240}, {req_limit, 32}]}]},
     {audit_trail_log, [{type, read_write_log}, 
                        {dir,  "/ldisk/snmp/agent/log"}]},
     {mib_storage, {dets, "/ldisk/snmp/agent/mibs", clear}},
     {mib_server, [{mibentry_override,true},
                   {trapentry_override,true},
                   {verbosity,info}]}
    ]
   },
   {manager,
    [{priority, normal},
     {versions, [v1,v2,v3]},
     {config,   [{dir, "/ldisk/snmp/manager/conf"},
                 {verbosity, trace}]},
     {server,   [{verbosity, trace}]},
     {net_if,
      [{module,    snmpm_net_if},
       {verbosity, log},
       {options,   [{recbuf, 10240}]}]},
     {audit_trail_log, [{dir,    "/ldisk/snmp/manager/log"},
                        {size,   {10,10240}},
                        {repair, true}]}
    ]
   }
  ]
 }
].