![]() |
Extend SNMP Agent to launch command with variable parameters
Hi,
I'm trying to launch a command with variables arguments through SNMP, I think extending the SNMP Agent is best option, but I'm not quite sure... The situation is this: I have to look for the AP a host (using as search criteria its mac) is connected, and every AP are in the same network. I think I could send an SNMP request to broadcast and wait for the AP with the host associated response... but I need to send the host mac in the SNMP request and use it in the command as argument. Is this possible?? |
|
Solved! I used SNMP Traps like this:
In the (Debian) server: /etc/default/snmpd Code:
# This file controls the activity of snmpd and snmptrapd/etc/snmp/snmptrapd.conf Code:
authCommunity execute public/root/FindMac.sh Code:
#!/bin/bashIn the client: Code:
snmptrap -v 2c -c public [SERVER_IP_OR_HOSTNAME] '' NOTIFICATION-TEST-MIB::demo-notif SNMPv2-MIB::sysLocation.0 s "aa:bb:cc:dd:ee:ff"Notes: 1. The OID and MIB I used in this example aren't the correct ones, but it's working for my testing purposes. 2. The security in this example is TOO POOR. I have to change this to port it to production environment. |
| All times are GMT -5. The time now is 11:03 PM. |