DX NetOps

 View Only
  • 1.  SystemEDGE custom script not working

    Posted Oct 02, 2014 12:09 PM

    Hi everyone,

    I tried reproducing one of the tests that is explained in the SystemEDGE manual with no success.

     

    This is what the sysedge.cf looks like (only the extension line): extension 1 OctetString ReadOnly ‘/bin/ping www.ca.com

     

    What I see is that Sysedge writes this: Executing extension command '/bin/ping www.ca.com 1 GET'

     

    And it is not returning any output. What am I doing wrong?

     

     

     




  • 2.  Re: SystemEDGE custom script not working

    Posted Oct 02, 2014 12:26 PM

    Hi, I would suggest that the response to your script needs to be a OctetString where the ping command response is not that, if you look at the extension information in the systemEDGE documentation there is a script for ping checks to do exactly what you seem to be trying to do here.

     

    Hope this helps,

    Ben.



  • 3.  Re: SystemEDGE custom script not working

    Broadcom Employee
    Posted Oct 02, 2014 12:30 PM

    Are you using ping as just a way to learn how to create extensions or do you really need to have the agent ping addresses?  If the latter, have you considered using the SRM (response time AIM) instead?



  • 4.  Re: SystemEDGE custom script not working

    Posted Oct 02, 2014 12:32 PM

    Actually I'm trying to reproduce the example of the manual. Otherwise, the SRM AIM would be a better solution I think.



  • 5.  Re: SystemEDGE custom script not working

    Posted Oct 03, 2014 09:13 AM

    This is what I'm getting in the log:

     

     

    2012768 2014-10-02 14:58:15.30 [D]-013286-f77776c0- SNMPV3_SnmpIncomingGetAll  : Request received...

    2012769 2014-10-02 14:58:15.30 [D]-013286-f77776c0- parse_authentication       : version = 1

    2012770 2014-10-02 14:58:15.30 [D]-013286-f77776c0- se/sysedge_snmp_read.c[127]: sysedge_snmp_read(): SNMP_SnmpIncomingGet passed; parsing varbinds ...

    2012771 2014-10-02 14:58:15.30 [D]-013286-f77776c0- se/snmp_vars.c[728]        : SEGetIPAddress_Ex(): Sucessfully processed IPv4 address '10.200.60.199'

    2012772 2014-10-02 14:58:15.30 [D]-013286-f77776c0- se/community.c[162]        : get_community(): Found access_comms[1]: community='FiberMonitor', access='read-only', hasAddr=0

    2012773 2014-10-02 14:58:15.30 [D]-013286-f77776c0- se/snmp_vars.c[342]        : getStatPtr(): Looking for OIDs '1.3.6.1.4.1.546.14.1.0'

    2012774 2014-10-02 14:58:15.30 [D]-013286-f77776c0- se/extension.c[927]        : var_extension(): Looking for oid '1.3.6.1.4.1.546.14.1.0', exact 1

    2012775 2014-10-02 14:58:15.30 [D]-013286-f77776c0- se/extension.c[935]        : var_extension(): Looking for index 1

    2012776 2014-10-02 14:58:15.30 [D]-013286-f77776c0- se/extension.c[951]        : var_extension(): Retrieving index 1, type 4

    2012777 2014-10-02 14:58:15.30 [D]-013286-f77776c0- se/extension.c[341]        : execute_command(): Executing extension command '/bin/ping www.ca.com 1 GET'

    2012778 2014-10-02 14:58:15.31 [W]-013286-f77776c0- se/extension.c[496]        : execute_command(): Extension command '/bin/ping www.ca.com 1 GET' had no output!

    2012779 2014-10-02 14:58:15.31 [D]-013286-f77776c0- se/extension.c[525]        : execute_command(): Child with pid 31187 returned 0, output:

    2012780 2014-10-02 14:58:15.31 [D]-013286-f77776c0- se/sysedge_snmp_read.c[217]: sysedge_snmp_read(): Error in sysedge_parse_varbind: NOSUCHNAME

    2012781 2014-10-02 14:58:15.31 [D]-013286-f77776c0- SNMP_SnmpRequestSend       : request_id = 2031692766

    2012782 2014-10-02 14:58:15.31 [D]-013286-f77776c0- make_authentication : version = 1

     

     

    And this is the output of the execution:

     

     

    # /bin/ping www.ca.com

    PING e320.x.akamaiedge.net (23.12.161.108) 56(84) bytes of data.

    64 bytes from a23-12-161-108.deploy.static.akamaitechnologies.com (23.12.161.108): icmp_seq=1 ttl=57 time=1.58 ms

    ^C

    --- e320.x.akamaiedge.net ping statistics ---

    1 packets transmitted, 1 received, 0% packet loss, time 442ms

    rtt min/avg/max/mdev = 1.588/1.588/1.588/0.000 ms

     

     

    # /bin/ping www.ca.com 1 GET

      ping: unknown host GET



  • 6.  Re: SystemEDGE custom script not working
    Best Answer

    Posted Oct 06, 2014 03:03 AM

    never tried, but I think youre right in that the example in the manul is not valid

    First, by using the plain ping command, it will run forever, probably not good for producing a defined output

    Secondly, the agent always appends the index (1) and the request type (GET) of your SNMP call to the extension commands, and expects them to handle that correctly. The plain 'ping' command however, treats them as hosts it cannot find

     

    So, better write a script that produces output.