This module implements an SNMP interface to EVA LOG. The
MIB implemented by this adaptation is OTP-EVA-LOG-MIB. The MIB
is located in the directory mibs
in the distribution.
create_tables(Nodes) -> void()
Nodes = [node()]
This function creates the necessary Mnesia tables for the
eva log SNMP implementation. Nodes
is a list of
nodes where the tables should be replicated. This list of
nodes should specify the same nodes where the application
EVA can be run distributed, so that EVA can always have
local access to the tables.
This function should be called once when installing the EVA application in the system.
start_link(LogDir, MaxSize) -> {ok, Pid} | {error, Reason}
LogDir = string()
MaxDirSize = integer()
Starts the EVA LOG SNMP implementation. This function can
be used to include the service in a supervisor. Normally,
functions in the supervisor eva_sup
can be used
instead.
LogDir
is a directory where all manager created logs
are stored. The directory must exist.
MaxDirSize
is the maximum total space the logs
manager created logs are allowed to use.
The function create_tables/1
must be called
before the server is started.
In some cases, other adaptations may need access to the SNMP
specific data in EVA LOG. To do this, the instrumentation functions
for the SNMP objects can be used. These instrumentation
functions takes the arguments and return the values defined in
the application snmp
.
log_discr_table(Op, RowIndex, Cols) -> InstrumRet
Instrumentation function for logDiscriminatorTable
.
This function assumes that access checks are made according
to the MIB. It may crash if, for example, logDiscrRowStatus
is set no notReady
.
log_table(Op, RowIndex, Cols) -> InstrumRet
Instrumentation function for logTable
. This
function assumes that access checks are made according to
the MIB. It may crash if, for example, logOperStatus
is
set.
log_total_max_allowed(get) -> InstrumRet
Instrumentation function for logTotalMaxAllowedSize
.
log_total_max_size(get) -> InstrumRet
Instrumentation function for logTotalMaxSize
.
eva_log(3), eva_sup(3)