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 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This document was generated using DocBuilder 3.3.3 -->
<HTML>
<HEAD>
<TITLE>Definition of Agent Configuration Files</TITLE>
<SCRIPT type="text/javascript" src="../../../../doc/erlresolvelinks.js">
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF"
ALINK="#FF0000">
<CENTER>
<A HREF="http://www.erlang.se"><IMG BORDER=0 ALT="[Ericsson AB]" SRC="min_head.gif"></A>
</CENTER>
<A NAME="6"><!-- Empty --></A>
<H2>6 Definition of Agent Configuration Files</H2>
<P>All configuration data must be included in configuration files
that are located in the configuration directory. The name of this
directory is given in the <CODE>config_dir</CODE> configuration
parameter. These files are read at start-up, and are used to
initialize the SNMPv2-MIB or STANDARD-MIB, SNMP-FRAMEWORK-MIB,
SNMP-MPD-MIB, SNMP-VIEW-BASED-ACM-MIB, SNMP-COMMUNITY-MIB,
SNMP-USER-BASED-SM-MIB, SNMP-TARGET-MIB and SNMP-NOTIFICATION-MIB
(refer to the <A HREF="snmp_agent_funct_descr.html#management">Management of the Agent
</A> for a description of the MIBs).
<P>The directory where the configuration files are found is given as
a parameter to the agent.
<P>The entry format in all files are Erlang terms, separated by a
'<STRONG>.</STRONG>' and a <STRONG>newline</STRONG>. In the following sections, the
formats of these terms are described. Comments may be specified as
ordinary Erlang comments.
<P>Syntax errors in these files are discovered and reported with the
function <CODE>config_err/2</CODE> of the error report module at start-up.
<A NAME="6.1"><!-- Empty --></A>
<H3>6.1 Agent Information</H3>
<P>The agent information should be stored in a file called
<CODE>agent.conf</CODE>.
<P>Each entry is a tuple of size two:
<P><CODE>{AgentVariable, Value}.</CODE>
<P>
<UL>
<LI>
<CODE>AgentVariable</CODE> is one of the variables is
SNMP-FRAMEWORK-MIB or one of the internal variables
<CODE>intAgentUDPPort</CODE>, which defines which UDP port the agent
listens to, or <CODE>intAgentIpAddress</CODE>, which defines the IP
address of the agent.
</LI>
<LI>
<CODE>Value</CODE> is the value for the variable.
</LI>
</UL>
<P>The following example shows a <CODE>agent.conf</CODE> file:
<PRE>
{intAgentUDPPort, 4000}.
{intAgentIpAddress,[141,213,11,24]}.
{snmpEngineID, "mbj's engine"}.
{snmpEngineMaxPacketSize, 484}.
</PRE>
<P>The value of <CODE>snmpEngineID</CODE> is a string, which for a
deployed agent should have a very specific structure. See
RFC 2271/2571 for details.
<A NAME="6.2"><!-- Empty --></A>
<H3>6.2 Contexts</H3>
<P>The context information should be stored in a file called
<CODE>context.conf</CODE>. The default context <CODE>""</CODE>
need not be present.
<P>Each row defines a context in the agent. This information is
used in the table <CODE>vacmContextTable</CODE> in the
SNMP-VIEW-BASED-ACM-MIB.
<P>Each entry is a term:
<P><CODE>ContextName.</CODE>
<P>
<UL>
<LI>
<CODE>ContextName</CODE> is a string.
</LI>
</UL>
<A NAME="6.3"><!-- Empty --></A>
<H3>6.3 System Information</H3>
<P>The system information should be stored in a file called
<CODE>standard.conf</CODE>.
<P>Each entry is a tuple of size two:
<P><CODE>{SystemVariable, Value}.</CODE>
<P>
<UL>
<LI>
<CODE>SystemVariable</CODE> is one of the variables in the
system group, or <CODE>snmpEnableAuthenTraps</CODE>.
</LI>
<LI>
<CODE>Value</CODE> is the value for the variable.
</LI>
</UL>
<P>The following example shows a valid <CODE>standard.conf</CODE> file:
<PRE>
{sysDescr, "Erlang SNMP agent"}.
{sysObjectID, [1,2,3]}.
{sysContact, "(mbj,eklas)@erlang.ericsson.se"}.
{sysName, "test"}.
{sysServices, 72}.
{snmpEnableAuthenTraps, enabled}.
</PRE>
<P>A value must be provided for all variables, which lack default
values in the MIB.
<A NAME="6.4"><!-- Empty --></A>
<H3>6.4 Communities</H3>
<P>The community information should be stored in a file called
<CODE>community.conf</CODE>. It must be present if the agent is
configured for SNMPv1 or SNMPv2c.
<P>The corresponding table is <CODE>snmpCommunityTable</CODE> in the
SNMP-COMMUNITY-MIB.
<P>Each entry is a term:
<P><CODE>{CommunityIndex, CommunityName, SecurityName, ContextName,
TransportTag}.</CODE>
<P>
<UL>
<LI>
<CODE>CommunityIndex</CODE> is a non-empty string.
</LI>
<LI>
<CODE>CommunityName</CODE> is a string.
</LI>
<LI>
<CODE>SecurityName</CODE> is a string.
</LI>
<LI>
<CODE>ContextName</CODE> is a string.
</LI>
<LI>
<CODE>TransportTag</CODE> is a string.
</LI>
</UL>
<A NAME="6.5"><!-- Empty --></A>
<H3>6.5 MIB Views for VACM</H3>
<P>The information about MIB Views for VACM should be stored in a
file called
<CODE>vacm.conf</CODE>.
<P>The corresponding tables are <CODE>vacmSecurityToGroupTable</CODE>,
<CODE>vacmAccessTable</CODE> and <CODE>vacmViewTreeFamilyTable</CODE> in the
SNMP-VIEW-BASED-ACM-MIB.
<P>Each entry is one of the terms, one entry corresponds to one
row in one of the tables.
<P><CODE>{vacmSecurityToGroup, SecModel, SecName, GroupName}.</CODE>
<P><CODE>{vacmAccess, GroupName, Prefix, SecModel, SecLevel, Match, ReadView, WriteView, NotifyView}.</CODE>
<P><CODE>{vacmViewTreeFamily, ViewIndex, ViewSubtree, ViewStatus, ViewMask}.</CODE>
<P>
<UL>
<LI>
<CODE>SecModel</CODE> is <CODE>any</CODE>, <CODE>v1</CODE>, <CODE>v2c</CODE>, or
<CODE>usm</CODE>.
<BR>
</LI>
<LI>
<CODE>SecName</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>GroupName</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>Prefix</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>SecLevel</CODE> is <CODE>noAuthNoPriv</CODE>, <CODE>authNoPriv</CODE>,
or <CODE>authPriv</CODE>
<BR>
</LI>
<LI>
<CODE>Match</CODE> is <CODE>prefix</CODE> or <CODE>exact</CODE>.
<BR>
</LI>
<LI>
<CODE>ReadView</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>WriteView</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>NotifyView</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>ViewIndex</CODE> is an integer.
<BR>
</LI>
<LI>
<CODE>ViewSubtree</CODE> is a list of integer.
<BR>
</LI>
<LI>
<CODE>ViewStatus</CODE> is either <CODE>included</CODE> or <CODE>excluded</CODE>
<BR>
</LI>
<LI>
<CODE>ViewMask</CODE> is either <CODE>null</CODE> or a list of ones and
zeros. Ones nominate that an exact match is used for this
sub-identifier. Zeros are wildcards which match any
sub-identifier. If the mask is shorter than the subtree, the
tail is regarded as all ones. <CODE>null</CODE> is shorthand for a
mask with all ones.
<BR>
</LI>
</UL>
<A NAME="6.6"><!-- Empty --></A>
<H3>6.6 Security data for USM</H3>
<P>The information about Security data for USM should be stored in a
file called
<CODE>usm.conf</CODE>, which must be present if the agent is configured
for SNMPv3.
<P>The corresponding table is <CODE>usmUserTable</CODE> in the
SNMP-USER-BASED-SM-MIB.
<P>Each entry is a term:
<P><CODE>{EngineID, UserName, SecName, Clone, AuthP, AuthKeyC, OwnAuthKeyC,
PrivP, PrivKeyC, OwnPrivKeyC, Public, AuthKey, PrivKey}.</CODE>
<P>
<UL>
<LI>
<CODE>EngineID</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>UserName</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>SecName</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>Clone</CODE> is <CODE>zeroDotZero</CODE> or a list of integers.
<BR>
</LI>
<LI>
<CODE>AuthP</CODE> is a <CODE>usmNoAuthProtocol</CODE>,
<CODE>usmHMACMD5AuthProtocol</CODE>, or <CODE>usmHMACSHAAuthProtocol</CODE>.
<BR>
</LI>
<LI>
<CODE>AuthKeyC</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>OwnAuthKeyC</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>PrivP</CODE> is a <CODE>usmNoPrivProtocol</CODE>,
<CODE>usmDESPrivProtocol</CODE> or <CODE>usmAesCfb128Protocol</CODE>.
<BR>
</LI>
<LI>
<CODE>PrivKeyC</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>OwnPrivKeyC</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>Public</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>AuthKey</CODE> is a list (of integer). This is the User's secret
localized authentication key. It is not visible in the MIB. The length
of this key needs to be 16 if <CODE>usmHMACMD5AuthProtocol</CODE> is used, and
20 if <CODE>usmHMACSHAAuthProtocol</CODE> is used.
<BR>
</LI>
<LI>
<CODE>PrivKey</CODE> is a list (of integer). This is the User's secret
localized encryption key. It is not visible in the MIB. The length
of this key needs to be 16 if <CODE>usmDESPrivProtocol</CODE> or
<CODE>usmAesCfb128Protocol</CODE> is used.
<BR>
</LI>
</UL>
<A NAME="6.7"><!-- Empty --></A>
<H3>6.7 Notify Definitions</H3>
<P>The information about Notify Definitions should be stored in a
file called
<CODE>notify.conf</CODE>.
<P>The corresponding table is <CODE>snmpNotifyTable</CODE> in the
SNMP-NOTIFICATION-MIB.
<P>Each entry is a term:
<P><CODE>{NotifyName, Tag, Type}.</CODE>
<P>
<UL>
<LI>
<CODE>NotifyName</CODE> is a unique non-empty string.
<BR>
</LI>
<LI>
<CODE>Tag</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>Type</CODE> is <CODE>trap</CODE> or <CODE>inform</CODE>.
<BR>
</LI>
</UL>
<A NAME="target_addr"><!-- Empty --></A><A NAME="6.8"><!-- Empty --></A>
<H3>6.8 Target Address Definitions</H3>
<P>The information about Target Address Definitions should be
stored in a file called
<CODE>target_addr.conf</CODE>.
<P>The corresponding tables are <CODE>snmpTargetAddrTable</CODE> in the
SNMP-TARGET-MIB and <CODE>snmpTargetAddrExtTable</CODE> in the SNMP-COMMUNITY-MIB.
<P>Each entry is a term:
<P><CODE>{TargetName, Ip, Udp, Timeout, RetryCount, TagList,
ParamsName, EngineId}.</CODE> or<BR>
<CODE>{TargetName, Ip, Udp, Timeout, RetryCount, TagList,
ParamsName, EngineId, TMask, MaxMessageSize}.</CODE>
<P>
<UL>
<LI>
<CODE>TargetName</CODE> is a unique non-empty string.
<BR>
</LI>
<LI>
<CODE>Ip</CODE> is a list of four integers.
<BR>
</LI>
<LI>
<CODE>Udp</CODE> is an integer.
<BR>
</LI>
<LI>
<CODE>Timeout</CODE> is an integer.
<BR>
</LI>
<LI>
<CODE>RetryCount</CODE> is an integer.
<BR>
</LI>
<LI>
<CODE>TagList</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>ParamsName</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>EngineId</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>TMask</CODE> is a string of size 0, or size 6 (default: []).
<BR>
</LI>
<LI>
<CODE>MaxMessageSize</CODE> is an integer (default: 2048).
<BR>
</LI>
</UL>
<A NAME="target_params"><!-- Empty --></A><A NAME="6.9"><!-- Empty --></A>
<H3>6.9 Target Parameters Definitions</H3>
<P>The information about Target Parameters Definitions should be
stored in a file called
<CODE>target_params.conf</CODE>.
<P>The corresponding table is <CODE>snmpTargetParamsTable</CODE> in the
SNMP-TARGET-MIB.
<P>Each entry is a term:
<P><CODE>{ParamsName, MPModel, SecurityModel, SecurityName, SecurityLevel}.</CODE>
<P>
<UL>
<LI>
<CODE>ParamsName</CODE> is a unique non-empty string.
<BR>
</LI>
<LI>
<CODE>MPModel</CODE> is <CODE>v1</CODE>, <CODE>v2c</CODE> or <CODE>v3</CODE>
<BR>
</LI>
<LI>
<CODE>SecurityModel</CODE> is <CODE>v1</CODE>, <CODE>v2c</CODE>, or <CODE>usm</CODE>.
<BR>
</LI>
<LI>
<CODE>SecurityName</CODE> is a string.
<BR>
</LI>
<LI>
<CODE>SecurityLevel</CODE> is <CODE>noAuthNoPriv</CODE>, <CODE>authNoPriv</CODE>
or <CODE>authPriv</CODE>.
<BR>
</LI>
</UL>
<CENTER>
<HR>
<SMALL>
Copyright © 1991-2006
<A HREF="http://www.erlang.se">Ericsson AB</A><BR>
</SMALL>
</CENTER>
</BODY>
</HTML>
|