Page Sequence Monitor to monitor Flash based website

#1

(This question was originally asked here in the opennms-discuss mailing list)

I’m currently using OpenNMS 23.0.3, and I’m wondering if it is possible to configure a page sequence monitor to work with a flash based site? (or if there is another way to monitor such a site.)

(there is a project to move this particular application to HTML5, but I need to be able to monitor the existing flash based site until such time as the HTML 5 version is rolled out.)

After speaking with the application developers, it is possible to bypass the flash requirement, however an XML payload needs to be passed with the POST commands.

<interaction>
    <actions>
        <action>
             <name>loginEncoded</name>
             <data>
                  <username>test</username>
                  <password>PWHASH</password>
                  <scope/>
                  <position/>
                  <rememberMe>N</rememberMe>
              </data>
              <id>D68C4286-3D9B-315F-9131-98D8D6A29AEF</id>
         </action>
    </actions>
    <chains/>
    <application>login</application>
    <applicationPage/>
</interaction>

@p-brane gave a suggestion that might work (see original discussion) which I have implemented with the following code:

    <page-sequence>
       <page disable-ssl-verification="true" ds-name="ellipse-landing" host="${nodelabel}" http-version="1.1" method="GET" path="/ria/ui.html" port="443" response-range="100-399" scheme="https" virtual-host="${nodelabel}"/>
       <page disable-ssl-verification="true" ds-name="ellipse-login" host="${nodelabel}" http-version="1.1" method="POST" path="/ria/bind" port="443" response-range="100-399" scheme="https" successMatch="invalid.credentials" virtual-host="${nodelabel}">
          <parameter key="action0" value="login" />
          <parameter key="app" value="login" />
          <parameter key="interaction" value="&lt;interaction&gt;&lt;actions&gt;&lt;action&gt;&lt;name&gt;loginEncoded&lt;/name&gt;&lt;data&gt;&lt;username&gt;ABB_Monitoring&lt;/username&gt;&lt;password&gt;PWHASH&lt;/password&gt;&lt;scope/&gt;&lt;position/&gt;&lt;rememberMe&gt;N&lt;/rememberMe&gt;&lt;/data&gt;&lt;id&gt;DFAE79EF-C3FC-3056-DE42-93ED89314098&lt;/id&gt;&lt;/action&gt;&lt;/actions&gt;&lt;chains/&gt;&lt;application&gt;login&lt;/application&gt;&lt;applicationPage/&gt;&lt;/interaction&gt;"/>
       </page>
    </page-sequence>

According to Google Chrome Developer tools, the POST command has a response of:

<interaction><actions><action><id>D68C4286-3D9B-315F-9131-98D8D6A29AEF</id><messages><errors><message><index>-1</index><text>invalid.credentials</text></message></errors></messages><name>loginEncoded</name></action></actions><application>login</application><applicationPage></applicationPage><transaction>false</transaction></interaction>

which was why I set the “successMatch” to “invalid.credentials”

However, this config is not working. Debug logging shows this:

2019-03-21 08:32:38,844 DEBUG [pool-9-thread-2000] o.o.n.p.m.PageSequenceMonitor: Executing HttpPage: org.opennms.netmgt.poller.monitors.PageSequenceMonitor$HttpPage@68ad5f8b[page.httpVersion=1.1,page.host=${nodelabel},page.requireIPv4=false,page.requireIPv6=false,page.port=443,page.method=POST,page.virtualHost=${nodelabel},page.path=/ria/bind,page.query=<null>,page.successMatch=invalid.credentials,page.failureMatch=<null>,page.locationMatch=<null>]
2019-03-21 08:32:38,844 DEBUG [pool-9-thread-2000] o.o.c.w.HttpClientWrapper: addRequestInterceptor: org.opennms.core.web.HttpClientWrapper$1@48ec7fa7
2019-03-21 08:32:38,844 DEBUG [pool-9-thread-2000] o.o.c.w.HttpClientWrapper: setVirtualHost: host=tst-n01-eau.ellipsehosting.com:443
2019-03-21 08:32:38,844 DEBUG [pool-9-thread-2000] o.o.c.w.HttpClientWrapper: setVersion: version=HTTP/1.1
2019-03-21 08:32:38,844 DEBUG [pool-9-thread-2000] o.o.c.w.HttpClientWrapper: setUserAgent: userAgent=OpenNMS PageSequenceMonitor (Service name: WebCheck-Ellipse)
2019-03-21 08:32:38,844 DEBUG [pool-9-thread-2000] o.o.c.w.HttpClientWrapper: useRelaxedSSL: scheme=https
2019-03-21 08:32:38,844 DEBUG [pool-9-thread-2000] o.o.n.p.m.PageSequenceMonitor: I have 4 service properties.
2019-03-21 08:32:38,844 DEBUG [pool-9-thread-2000] o.o.n.p.m.PageSequenceMonitor: I have 0 sequence properties.
2019-03-21 08:32:38,844 DEBUG [pool-9-thread-2000] o.o.c.w.HttpClientWrapper: execute: HttpClientWrapper [reuseConnections=true, usePreemptiveAuth=false, useSystemProxySettings=false, cookieSpec=compatibility, username=null, password=null, socketTimeout=5000, connectionTimeout=5000, retries=0, sslContext={https=javax.net.ssl.SSLContext@1c8c1f88}, requestInterceptors=[org.opennms.core.web.HttpClientWrapper$1@48ec7fa7, org.opennms.core.web.HttpClientWrapper$1@15fbac10], responseInterceptors=[], userAgent=OpenNMS PageSequenceMonitor (Service name: WebCheck-Ellipse), virtualHost=tst-n01-eau.ellipsehosting.com:443, version=HTTP/1.1]; method: POST https://tst-n01-eau.ellipsehosting.com:443/ria/bind HTTP/1.1
2019-03-21 08:32:38,845 DEBUG [pool-9-thread-2000] o.a.h.c.p.RequestAddCookies: CookieSpec selected: compatibility
2019-03-21 08:32:38,845 DEBUG [pool-9-thread-2000] o.a.h.c.p.RequestAddCookies: Cookie [version: 0][name: JSESSIONID][value: ewKEVKIrvqQyffzJPFGxdgSD.ellonlbatlb0-tst][domain: tst-n01-eau.ellipsehosting.com][path: /][expiry: null] match [(secure)tst-n01-eau.ellipsehosting.com:443/ria/bind]
2019-03-21 08:32:38,845 DEBUG [pool-9-thread-2000] o.a.h.c.p.RequestAddCookies: Cookie [version: 0][name: globalSessionId][value: 1676b854-1f86-4736-9909-0c2beaa0b62c][domain: tst-n01-eau.ellipsehosting.com][path: /][expiry: null] match [(secure)tst-n01-eau.ellipsehosting.com:443/ria/bind]
2019-03-21 08:32:38,845 DEBUG [pool-9-thread-2000] o.a.h.c.p.RequestAddCookies: Cookie [version: 0][name: serverId][value: a030861c-9c72-410a-8d58-ea145e73f5f0][domain: tst-n01-eau.ellipsehosting.com][path: /][expiry: null] match [(secure)tst-n01-eau.ellipsehosting.com:443/ria/bind]
2019-03-21 08:32:38,845 DEBUG [pool-9-thread-2000] o.a.h.c.p.RequestAuthCache: Auth cache not set in the context
2019-03-21 08:32:38,845 INFO  [pool-9-thread-2000] o.o.c.w.HttpClientWrapper: httpRequestInterceptor: removing default port from host header
2019-03-21 08:32:38,845 DEBUG [pool-9-thread-2000] o.a.h.i.c.BasicHttpClientConnectionManager: Get connection for route {s}->https://tst-n01-eau.ellipsehosting.com:443
2019-03-21 08:32:38,845 DEBUG [pool-9-thread-2000] o.a.h.i.e.MainClientExec: Opening connection {s}->https://tst-n01-eau.ellipsehosting.com:443
2019-03-21 08:32:38,845 DEBUG [pool-9-thread-2000] o.a.h.i.c.DefaultHttpClientConnectionOperator: Connecting to tst-n01-eau.ellipsehosting.com/52.147.13.45:443
2019-03-21 08:32:38,845 DEBUG [pool-9-thread-2000] o.a.h.c.s.SSLConnectionSocketFactory: Connecting socket to tst-n01-eau.ellipsehosting.com/52.147.13.45:443 with timeout 5000
2019-03-21 08:32:38,847 DEBUG [pool-9-thread-2000] o.a.h.c.s.SSLConnectionSocketFactory: Enabled protocols: [TLSv1, TLSv1.1, TLSv1.2]
2019-03-21 08:32:38,847 DEBUG [pool-9-thread-2000] o.a.h.c.s.SSLConnectionSocketFactory: Enabled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256]
2019-03-21 08:32:38,847 DEBUG [pool-9-thread-2000] o.a.h.c.s.SSLConnectionSocketFactory: Starting handshake
2019-03-21 08:32:38,853 DEBUG [pool-9-thread-2000] o.a.h.c.s.SSLConnectionSocketFactory: Secure session established
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.c.s.SSLConnectionSocketFactory:  negotiated protocol: TLSv1.2
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.c.s.SSLConnectionSocketFactory:  negotiated cipher suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.c.s.SSLConnectionSocketFactory:  peer principal: CN=*.ellipsehosting.com, OU=Domain Control Validated
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.c.s.SSLConnectionSocketFactory:  peer alternative names: [*.ellipsehosting.com, ellipsehosting.com]
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.c.s.SSLConnectionSocketFactory:  issuer principal: CN=Go Daddy Secure Certificate Authority - G2, OU=http://certs.godaddy.com/repository/, O="GoDaddy.com, Inc.", L=Scottsdale, ST=Arizona, C=US
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.i.c.DefaultHttpClientConnectionOperator: Connection established 10.2.0.9:17578<->52.147.13.45:443
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.i.c.DefaultManagedHttpClientConnection: http-outgoing-1614: set socket timeout to 5000
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.i.e.MainClientExec: Executing request POST /ria/bind HTTP/1.1
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.i.e.MainClientExec: Target auth state: UNCHALLENGED
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.i.e.MainClientExec: Proxy auth state: UNCHALLENGED
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 >> POST /ria/bind HTTP/1.1
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 >> User-Agent: OpenNMS PageSequenceMonitor (Service name: WebCheck-Ellipse)
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 >> Host: tst-n01-eau.ellipsehosting.com
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 >> Content-Length: 476
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 >> Content-Type: application/x-www-form-urlencoded; charset=UTF-8
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 >> Connection: Keep-Alive
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 >> Cookie: JSESSIONID=ewKEVKIrvqQyffzJPFGxdgSD.ellonlbatlb0-tst; globalSessionId=1676b854-1f86-4736-9909-0c2beaa0b62c; serverId=a030861c-9c72-410a-8d58-ea145e73f5f0
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 >> Accept-Encoding: gzip,deflate
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 >> "POST /ria/bind HTTP/1.1[\r][\n]"
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 >> "User-Agent: OpenNMS PageSequenceMonitor (Service name: WebCheck-Ellipse)[\r][\n]"
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 >> "Host: tst-n01-eau.ellipsehosting.com[\r][\n]"
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 >> "Content-Length: 476[\r][\n]"
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 >> "Content-Type: application/x-www-form-urlencoded; charset=UTF-8[\r][\n]"
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 >> "Connection: Keep-Alive[\r][\n]"
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 >> "Cookie: JSESSIONID=ewKEVKIrvqQyffzJPFGxdgSD.ellonlbatlb0-tst; globalSessionId=1676b854-1f86-4736-9909-0c2beaa0b62c; serverId=a030861c-9c72-410a-8d58-ea145e73f5f0[\r][\n]"
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 >> "Accept-Encoding: gzip,deflate[\r][\n]"
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 >> "[\r][\n]"
2019-03-21 08:32:38,854 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 >> "action0=login&app=login&interaction=%3Cinteraction%3E%3Cactions%3E%3Caction%3E%3Cname%3EloginEncoded%3C%2Fname%3E%3Cdata%3E%3Cusername%3EABB_Monitoring%3C%2Fusername%3E%3Cpassword%3EPWHASH%3C%2Fpassword%3E%3Cscope%2F%3E%3Cposition%2F%3E%3CrememberMe%3EN%3C%2FrememberMe%3E%3C%2Fdata%3E%3Cid%3EDFAE79EF-C3FC-3056-DE42-93ED89314098%3C%2Fid%3E%3C%2Faction%3E%3C%2Factions%3E%3Cchains%2F%3E%3Capplication%3Elogin%3C%2Fapplication%3E%3CapplicationPage%2F%3E%3C%2Finteraction%3E"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "HTTP/1.1 200 OK[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "Date: Wed, 20 Mar 2019 22:32:38 GMT[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "Server: ABB_JI[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "X-XSS-Protection: 1; mode=block[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "X-Content-Type-Options: nosniff[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "X-XSS-Protection: 1; mode=block[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "X-Content-Type-Options: nosniff[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "Content-Type: text/plain;charset=ISO-8859-1[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "Vary: Accept-Encoding[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "Content-Encoding: gzip[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "Cache-Control: max-age=3[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "Expires: Wed, 20 Mar 2019 22:32:41 GMT[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "Connection: close[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "Transfer-Encoding: chunked[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << HTTP/1.1 200 OK
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << Date: Wed, 20 Mar 2019 22:32:38 GMT
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << Server: ABB_JI
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << X-XSS-Protection: 1; mode=block
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << X-Content-Type-Options: nosniff
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << Strict-Transport-Security: max-age=31536000; includeSubDomains
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << X-XSS-Protection: 1; mode=block
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << X-Content-Type-Options: nosniff
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << Content-Type: text/plain;charset=ISO-8859-1
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << Vary: Accept-Encoding
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << Content-Encoding: gzip
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << Cache-Control: max-age=3
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << Expires: Wed, 20 Mar 2019 22:32:41 GMT
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << Connection: close
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.headers: http-outgoing-1614 << Transfer-Encoding: chunked
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "35[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "[0x1f][0x8b][0x8][0x0][0x0][0x0][0x0][0x0][0x0][0x3]r[0xce][0xcf]+I[0xcd]+Q([0xa9],HU[0xc8]--.QHJUH,([0xc8][0xc9]LN,[0xc9][0xcc][0xcf][0xd3][0xaf][0xc8][0xcd][0xe1][0x2][0x0][0x0][0x0][0xff][0xff]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "a[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "[0x3][0x0][0xfe]=[0xa7]A%[0x0][0x0][0x0]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "0[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.wire: http-outgoing-1614 << "[\r][\n]"
2019-03-21 08:32:38,867 DEBUG [pool-9-thread-2000] o.a.h.i.c.DefaultManagedHttpClientConnection: http-outgoing-1614: Close connection
2019-03-21 08:32:38,868 DEBUG [pool-9-thread-2000] o.a.h.i.e.MainClientExec: Connection discarded
2019-03-21 08:32:38,868 DEBUG [pool-9-thread-2000] o.a.h.i.c.BasicHttpClientConnectionManager: Releasing connection [Not bound]
2019-03-21 08:32:38,868 DEBUG [pool-9-thread-2000] o.o.n.p.m.PageSequenceMonitor: Failed to find 'invalid.credentials' in page content at https://tst-n01-eau.ellipsehosting.com:443/ria/bind:

looking for ideas on how to get this Flash application monitoring to work.

Regards,
John

#3

In general, when you monitor websites you have to be aware of two things:

  1. Static content is delivered and just rendered on the client side
  2. You move code to the client which is executed on the client side

You can monitor 1 with HTTP monitor and PageSequenceMonitor easily. For 2 the monitor needs the engine to execute the code as the client would do it, e.g. having a JavaScript engine or a Flash interpreter inside.

For 2 with Flash you need a more feature rich web testing framework like Selenium with Flash capabilities. As far from a quick web search it might be possible but out-of-the-box Selenium has no Flash support. Here also something I’ve found with PhantomJS and Flash.

In general, there is a Selenium Monitor in OpenNMS which allows you to integrate this in your monitoring. You have to be aware of, these tests become resource expensive on the OpenNMS side and on the server side you monitor, so the default of 5 minutes with many services can lead to issues.

1 Like
#4

Yes, that was why I spoke with the developers, and they pointed me in the direction of the URI the flash app uses. However, I need to be able to pass in an XML payload with the POST, so if I can figure out how to pass that XML from the page sequence monitor, I should be able to get my monitor to a satisfactory point.

I had a look at Selenium, and it does not detect the interactions of the flash application so I can’t use the Selenium IDE to build a usable config. I’ll have a look at the PhantomJS link you posted.

#5

Note: I’ve been testing with curl, and can confirm that posting the XML directly from the commandline (without all the surrounding flash application) works and returns the expected XML document

 curl -X POST -d @payload.xml -k --header 'Content-Type:application/xml;charset=UTF-8' 'https://10.165.4.132/ria/bind?app=login'
<interaction><actions><action><id>51153065-1428-7716-3474-999805BE53AB</id><messages><errors><message><index>-1</index><text>invalid.credentials</text></message></errors></messages><name>loginEncoded</name></action></actions><application>login</application><applicationPage></applicationPage><transaction>false</transaction></interaction>

I guess the Page Sequence Monitor needs a method to POST a file or a pre-constructed xml/json content, and to also be able to specify the content type. If this is not something that is already there, I can raise an enhancement request, and in the meantime, build a custom monitor that uses curl.

Regards,
John

#6

You should be able to define the method POST see here in the Page Sequence Monitor docs.

#7

Unfortunately, that doco doesn’t explain how to pass an XML payload to that POST.

Looking at the HttpPostMonitor component of the doco, the example has a payload key defined:

  <parameter key="payload" value="World"/>

Does this key work for the page sequence monitor? if it is, I’m guessing this is where I should be passing in my pre-formed XML?

Like this?:

<parameter key=“payload” value="&lt;interaction&gt;&lt;actions&gt;&lt;action&gt;&lt;name&gt;loginEncoded&lt;/name&gt;&lt;data&gt;&lt;username&gt;ABB_Monitoring&lt;/username&gt;&lt;password&gt;PWHASH&lt;/password&gt;&lt;scope/&gt;&lt;position/&gt;&lt;rememberMe&gt;N&lt;/rememberMe&gt;&lt;/data&gt;&lt;id&gt;DFAE79EF-C3FC-3056-DE42-93ED89314098&lt;/id&gt;&lt;/action&gt;&lt;/actions&gt;&lt;chains/&gt;&lt;application&gt;login&lt;/application&gt;&lt;applicationPage/&gt;&lt;/interaction&gt;"/>

Of course, I’d also need to define the content type as “application/xml”

#8

I was just reading the documentation on the xml collector, and discovered this:

    application/xml
      <xml-source url="http://{ipaddr}/post-example">
        <request method="POST">
          <content type='application/xml'><![CDATA[
            <person>
              <firstName>Alejandro</firstName>
              <lastName>Galue</lastName>
            </person>
          ]]></content>
        </request>
        <import-groups>xml-datacollection/my-groups.xml</import-groups>
      </xml-source>

This is the sort of functionality I’d like in the Page Sequence Monitor which would make the Page Sequence Monitor usable for monitoring my application.