# Manual execution

The plugin execution format is as follows:

```
./dynamic_snmp -agent <agentname> -h <host> -v <version> [-c <community>] [-u <username>] [-a <authProtocol>] [-A <authKey>] [-x <privProtocol>] [-X <privPassword>] [-l <securityLevel>] [-o <base oid>] [-names <instance>] [-branches <branches>] [-nodefaults 1] [-t_ip <tentacleIP>] [-t_port <tentaclePort>] [-t_opts "<tentacleOptions>"] [-t_file_path "<tentaclePath>"] [-m <transferMode>] [-wmin <wmin>] [-wmax <wmax>] [-cmin <cmin>] [-cmax <cmax>] [-alrt <alert_name>] [-group <moduleGroup>]
```

Example of basic monitoring with SNMPv2, with everything by default and launched as an Agent plugin. It will generate OperStatus, ifInOctets and ifOutOctets modules (ifHCInOctets and ifHCOutOctets if available):

```
./dynamic_snmp -h "192.168.51.1" -v "2c" -c "mycommunity"
```

Example of basic monitoring with SNMPv2, running as a Server plugin and using the inclusion and exclusion filters. The interfaces whose name contains ‘Ge’ will be monitored, but not for those containing ‘0/3’, and will be included in the agent whose agentname is ‘Test-agentname’:

```
./dynamic_snmp -agent "Test-agentname" -h "192.168.51.1" -v "2c" -c "mycommunity" -only "Ge" -reject "0/3"
```

Same example, but using SNMPv3:

```
./dynamic_snmp -agent "Test-agentname" -h "192.168.51.1" -v "3" -l "authPriv" -u "snmpv3user" -a "SHA" -A "PASSWORD1" -x "AES" -X "PASSWORD2" -only "Ge" -reject "0/3"
```

Example of custom monitoring with SNMPv2, running as a Server plugin, deactivating the default monitoring and manually choosing the branches to monitor:

```
./dynamic_snmp -agent "Test-agentname" -h "192.168.51.1" -v "2c" -c "mycommunity"  -o ".1.3.6.1.2.1" -names ".2.2.1.2" -branches "OperStatus:.2.2.1.8,AdminStatus:.2.2.1.7" -nodefaults 1
```

Note: The quotation marks shown in the examples above are not necessary, but may avoid problems.