Forum Discussion

kev_245_28249's avatar
kev_245_28249
Icon for Nimbostratus rankNimbostratus
Jun 08, 2011

convert OID to mcpd process id - per sol11127

Hi, I would like to make use of the 'logger -p' command to generate syslog messages in order to test syslog and snmp traps. I can get this working but find it difficult to know which of the following files one would find the mcpd code. Has anyone got any good tips?

 

ps i would have raised this under the 'testing forum' but it kept looping me to log on rather than taking me to the open a new post window).

 

 

eg of command: logger -p local0.notice "01070640:5: Node x.x.x.x monitor status down."

 

 

if say I want to test for interface up down, which file to I look in to covert the oid for interface up down?

 

 

[root@F5LAB-DC1-LTM-PRES:Active] alertd ll

 

total 628

 

-r--r--r-- 1 root root 17715 Jan 6 07:18 alert.conf

 

-r--r--r-- 1 root root 8093 Jan 6 07:18 alert_nokia.conf

 

-rw-r--r-- 1 root root 4527 Jan 6 07:17 bigip_alertd_error_maps.h

 

-rw-r--r-- 1 root root 1299 Apr 17 16:15 bigip_bcm56xxd_error_maps.h

 

-rw-r--r-- 1 root root 3725 Apr 17 16:18 bigip_bigd_error_maps.h

 

-rw-r--r-- 1 root root 1230 Jan 6 07:05 bigip_bigdb_error_maps.h

 

-rw-r--r-- 1 root root 5778 Apr 17 16:15 bigip_bigdbd_error_maps.h

 

-rw-r--r-- 1 root root 60 Jan 6 06:53 bigip_bigstart_error_maps.h

 

-rw-r--r-- 1 root root 1486 Apr 17 16:14 bigip_clusterd_error_maps.h

 

-rw-r--r-- 1 root root 3083 Apr 17 16:15 bigip_cs_error_maps.h

 

-rw-r--r-- 1 root root 1389 Jan 6 07:17 bigip_cssd_error_maps.h

 

-rw-r--r-- 1 root root 419 Jan 6 07:07 bigip_csyncd_error_maps.h

 

-rw-r--r-- 1 root root 654 Apr 17 16:06 bigip_dmon_error_maps.h

 

-rw-r--r-- 1 root root 788 Apr 17 16:04 bigip_fflag_error_maps.h

 

-rw-r--r-- 1 root root 1317 Jan 6 07:07 bigip_get_dossier_error_maps.h

 

-rw-r--r-- 1 root root 24229 Apr 17 16:19 bigip_gtmd_error_maps.h

 

-rw-r--r-- 1 root root 5077 Jan 6 07:05 bigip_ha_table_error_maps.h

 

-rw-r--r-- 1 root root 772 Jan 6 06:52 bigip_halmsg_error_maps.h

 

-rw-r--r-- 1 root root 1428 Apr 17 16:14 bigip_lacpd_error_maps.h

 

-rw-r--r-- 1 root root 853 Jan 6 06:59 bigip_libhal_error_maps.h

 

-rw-r--r-- 1 root root 387 Jan 6 07:08 bigip_lind_error_maps.h

 

-rw-r--r-- 1 root root 7229 Apr 17 16:09 bigip_mcp_error_maps.h

 

-rw-r--r-- 1 root root 156858 Apr 17 16:20 bigip_mcpd_error_maps.h

 

-rw-r--r-- 1 root root 709 Apr 17 16:25 bigip_mysqlhad_error_maps.h

 

-rw-r--r-- 1 root root 3504 Apr 17 16:19 bigip_shell_error_maps.h

 

-rw-r--r-- 1 root root 5228 Apr 17 16:25 bigip_sod_error_maps.h

 

-rw-r--r-- 1 root root 16637 Jan 6 07:14 bigip_statsd_error_maps.h

 

-rwxr-xr-x 1 root root 2928 Jan 6 07:07 bigip_stpd_error_maps.h

 

-rw-r--r-- 1 root root 280 Apr 17 16:23 bigip_subagents_error_maps.h

 

-rw-r--r-- 1 root root 744 Jan 6 07:08 bigip_syscall_error_maps.h

 

-rw-r--r-- 1 root root 776 Apr 17 16:18 bigip_system_check_error_maps.h

 

-rw-r--r-- 1 root root 20769 Jan 6 07:19 bigip_tamd_error_maps.h

 

-rw-r--r-- 1 root root 1303 Apr 17 16:21 bigip_tcl_checker_error_maps.h

 

-rw-r--r-- 1 root root 28534 Apr 17 16:05 bigip_tmm_error_maps.h

 

-rw-r--r-- 1 root root 10062 Jan 6 07:27 bigip_ts_error_maps.h

 

-rw-r--r-- 1 root root 4111 Apr 17 16:09 bigip_xdb_error_maps.h

 

-rw-r--r-- 1 root root 35427 Apr 17 16:18 bigip_zfd_error_maps.h

 

-rw-r--r-- 1 root root 5906 Jan 6 07:08 common_fpdd_error_maps.h

 

 

 

8 Replies

  • not sure i understand your question correctly.

     

     

    usually i search log from /var/run/bigip_error_maps.dat first.

     

    grep -i "monitor status" /var/run/bigip_error_maps.dat

     

    0 LOG_NOTICE 01070638 BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS "Pool member %s:%u monitor status %s."

     

    0 LOG_NOTICE 01070640 BIGIP_MCPD_MCPDERR_NODE_ADDRESS_MON_STATUS "Node %s monitor status %s."

     

    0 LOG_NOTICE 01070727 BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS_UP "Pool member %s:%u monitor status up."

     

    0 LOG_NOTICE 01070728 BIGIP_MCPD_MCPDERR_NODE_ADDRESS_MON_STATUS_UP "Node %s monitor status up."

     

     

    then i use alert name to find oid in /etc/alertd/alert.conf.

     

    grep -A3 BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS /etc/alertd/alert.conf

     

    alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS {

     

    snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.10"

     

    }

     

    alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS_UP {

     

    snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.11"

     

    }

     

     

    btw, u know bigip doesn't send trap for every log message. if i don't see it in alert.conf (and i need it), i will define it in user_alert.conf.
  • For eg, If I want to ensure I trap for and interface going down I am wondering which file I find the mcpd process number in?

     

    I have found that in the alert.conf file there is the from description, ie

     

    " * from fflag (CR36393) " description

     

    But if it is not in the alert file i'm wondering how to tell which file to look in (as posted above).

     

     

    I do understand the user_alert file. (thanks)

     

     

     

  • if u wanna have trap when interface is up/down, i think just setting up that message in user_alert.conf is enough (no need to put process number in user_alert.conf).

     

     

    if it does not work, could u pls post your user_alert.conf here?

     

     

    cheer!
  • To be clearer, I'm actually more interested in learning how to manually generate traps for testing purposes rather than just making Interface Up Down work.

     

     

    On production kit, rather than forcing an interface to actually go down I was hoping to just use the 'Logger' command to tick off that it gets received on our remote server.

     

     

    Evan

     

  • this is my test.

     

     

    [root@orchid:Active] config cat user_alert.conf

     

    alert TESET_LOG "hello world" {

     

    snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.1234"

     

    }

     

     

    [root@orchid:Active] config logger -p local0.info "hello world"

     

    [root@orchid:Active] config cat /var/log/ltm

     

    Jun 8 22:24:20 local/orchid info root: hello world

     

     

    timeIPversiontimestampsnmpTrapOIDvarbinds

     

    Thu Jun 09 13:24:14 SGT 2011172.28.16.34216 minutes 59 seconds.1.3.6.1.4.1.3375.2.4.0.1234OID: .1.3.6.1.2.1.1.3.0. Value: 16 minutes 59 seconds; OID: .1.3.6.1.6.3.1.1.4.1.0. Value: .1.3.6.1.4.1.3375.2.4.0.1234; OID: .1.3.6.1.4.1.3375.2.4.1.1. Value: hello world; OID: .1.3.6.1.6.3.1.1.4.3.0. Value: .1.3.6.1.4.1.3375.2.4;
  • Thanks, that is helpful.

     

    So if I wanted to use 'interface down' as an example (which is not a default trap). Other than bringing an interface down to see what the device inputs into /var/log/ltm file, how do I know what wording to put as my ?

     

    I get that I make up the OID from a reserved range

     

     

    I do not see interface down in the bigip_error_maps.dat file.

     

    Trying to follow: sol3727

     

     

     

  • >Other than bringing an interface down to see what the device inputs into /var/log/ltm file, how do I know what wording to put as my?

     

     

    if it's not pre-defined in /var/run/bigip_error_maps.dat, i don't think we know.

     

     

    these are log when interface is down. without bringing it down, i don't know it too. (- -")

     

    Jun 8 22:47:01 local/sccp info bcm56xxd[698]: 012c0015:6: Link: 1.3 is DOWN

     

    Jun 8 22:47:06 local/sccp info bcm56xxd[698]: 012c0015:6: Link: 1.3 is UP

     

     

    [root@orchid:Active] config grep -i link\: /var/run/bigip_error_maps.dat

     

    0 LOG_ERR 01060123 BIGIP_BIGD_BIGDERR_READ_NETLINK_IOCTL "read_netlink: ioctl fails %s."

     

    0 LOG_ERR 01060124 BIGIP_BIGD_BIGDERR_PROCESS_NETLINK_RECV "process_netlink: recv fails %s."

     

    0 LOG_INFO 012c0015 BIGIP_BCM56XXD_BCM56XXDERR_LINKSTATUS "Link: %s is %s"
  • Yeah I tore down my lab interface and got the info I needed. So I guess its 'use your lab to learn your info?'.

     

     

    my user file is:

     

    alert Interface_LOG "Link: 1.1 is DOWN" {

     

    snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.300."

     

    }

     

     

    my syslog result is:

     

    Jun 9 16:30:06 local/xxx-DC1-LTM-PRES info root: 012c0015 Link: 1.1 is DOWN

     

     

     

    my trap result is

     

    09-Jun-2011 04:29:02 PM EST trapParse.asl: 25652215|x.x.x.x|.1.3.6.1.4.1.3375.2.4|6|0|.1.3.6.1.4.1.3375.2.4.1.1|012c0015 Link: 1.1 is DOWN|.1.3.6.1.6.3.1.1.4.3.0|.1.3.6.1.4.1.3375.2.4|

     

    09-Jun-2011 04:29:02 PM EST trapParse.asl: IP Agent Address: x.x.x.x