Hello,
My problem is the same as the one reported in 'AGENT EXT SIT ON NAILS' case.
Basically, traphandle invokes correctly shutdown but it does not work if
a script is invoked.
Solution proposed by similar case was to compile again after changing a
function call. As I have downloaded binary and installed it directly in
AIX 4.3.3 server I would appreciate if someone can tell me how to solve
this issue without compiling.
Solution provided in the similar problem consists of changing
'run_exec_command' for 'run_shell_command' in apps/snmptrapd_handlers.c
and re-compiling.
In my case, I downloaded binary for net-snmp, so I can not re-compile.
Is there a way to make it work?
My server is running AIX 4.3.3 and Net-snmp 5.2 binary.
If my snmptrapd.conf looks like this:
traphandle default /usr/bin/shutdown
then it works fine.
But if I make a call to a script then it does not work:
traphandle default /usr/local/bin/saludo
Please note that script called 'saludo' has 777 permissions set.
Below you can see the debug output.
f80s3:/usr/local/bin:# /usr/local/sbin/snmptrapd -f -Le -Dsnmptrapd
Warning: no access control information configured.
It's unlikely this agent can serve any useful purpose in this state.
Run "snmpconf -g basic_setup" to help you configure the
snmptrapd.conf file fo
r this agent.
2007-05-16 09:14:43 NET-SNMP version 5.2 Started.
snmptrapd: input: a4
snmptrapd: Trap OID: SNMPv2-SMI::enterprises.318.0.998
snmptrapd: print_handler
snmptrapd: v1 format
2007-05-16 09:14:53 10.58.82.192(via UDP: [10.58.82.192]:-28301) TRAP,
SNMP v1,
community public
SNMPv2-SMI::enterprises.318 Enterprise Specific Trap (998)
Uptime: 4 day
s, 19:33:29.40
snmptrapd: get_traphandler default (200fe348)
snmptrapd: command_handler
snmptrapd: token = '/usr/local/bin/saludo'
snmptrapd: execute format
snmptrapd: notification_handler
So, it looks like it is invoking the script but for some reason it can
not be executed. It makes sense that solution is related to the function
call, calling run_shell_command instead of run_exec_command seems to be
ok. Problem is that I can not re-compile again. Maybe there is an
appropriate parameter somewhere?
Many thanks in advance,
Elena
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users