Accedian is now part of Cisco  |

Avatar photo
By Boris Rogier

How to get performance data with the Skylight

IT departments tend to centralize all IT Operational Analytics (ITOA) performance data into one repository to facilitate dashboarding, reporting, alerting, and forensics in a variety of solutions such as Elastic, Splunk, and Crystal Reports.

Extracting performance data from SkyLIGHT PVX is easy, here is how you can do it!

How to interact with SkyLIGHT PVX

Power users of SkyLIGHT PVX often ask for the ability to interact directly with SkyLIGHT PVX performance data.

SkyLIGHT PVX can already provide useful performance data through SNMP for business-critical applications (BCA) and business-critical networks (BCN), as explained in this article. With SNMP you can also monitor the operating system of the probe, capturing aspects such as resource usage.

However how to request a custom page with filters from another program? Starting with SkyLIGHT PVX 2.18, Accedian added a few useful features for developers to do so. (These have continued to be enhanced across PVX releases.)

Send a link with embedded authentication

First of all, a simple feature, very basic for now, you can send a link with the embedded login and password. It is typically insecure to share such a link (because the password is in plaintext) but you can use it on an untrusted network by using the HTTPS protocol. To create such a link, you can copy the URL from the SkyLIGHT PVX interface and then prepend the URI with user:password@ and add &auth=force-http in the URL query string.

Here’s an example of creating a link to the BCA page:

http://user:password@mySPV/nevrax/network/bca_dashboard.html?auth=force-http&filter.capture_begin=…

Please note that the URI needs at least one filter attribute to query data. If not, SkyLIGHT PVX will return a page with no data. If the capture_begin or capture_end filters are omitted, the engine will instead request data for the last hour.

Get data with scripting

The link seen above can also be used in a script. Command line tools such as wget or curl for example allow you to send HTTP authentication.

To further customize the result page, you can add one of the following skin prefixes:

  • to get a simplified HTML with  ++skin++simplehtml/
  • to get the page as a PDF document with ++skin++pdf/
Performance data via the SkyLIGHT PVX API: top servers
Illustration 1 : SkyLIGHT PVX Top Servers page as simple HTML

In the first example, we will retrieve the Top Servers page as stripped-down HTML, filtering for the SSH application, using the command-line with wget:

#Using the –auth-no-challenge option :

wget –user=admin –password=admin –auth-no-challenge ‘http://SPV/++skin++simplehtml/nevrax/network/ipstats_dst.html?filter.capture_begin=2013-01-31+14:50&filter.capture_end=2013-01-31+15:50&filter.serviceid=ssh’

 ## Using the *auth* query string parameter :

wget –user=admin –password=admin ‘http://SPV/++skin++simplehtml/nevrax/network/ipstats_dst.html?filter.capture_begin=2013-01-31+14:50&filter.capture_end=2013-01-31+15:50&filter.serviceid=ssh&auth=force-http’

In the next example, we will retrieve the Bandwidth Chart page as a PDF, using the command-line with curl:

###curl will automatically initiate Basic HTTP Authentication when you pass credentials with the ‘-u’ option :

curl -u admin:admin ‘http://SPV/++skin++pdf/nevrax/network/bw_chart_page.html?filter.capture_begin=2013-01-31+14%3A51&filter.capture_end=2013-01-31+15%3A51&filter.serviceid=ssh’ -o bandw_chart.pdf

If HTTPS is used to keep your credentials concealed, your client may need an option to skip the server certificate check. Here is an example with wget:

###Same wget query as above, using HTTPS, and a terser way to pass credentials :

wget –no-check-certificate ‘https://admin:admin/SPV/++skin++simplehtml/nevrax/network/ipstats_dst.html?filter.capture_begin=2013-01-31+14:50&filter.capture_end=2013-01-31+15:50&filter.serviceid=ssh&auth=force-http’

Get performance data by programming

You can use this new feature to make queries from your own code and obtain the result as HTML or PDF. Here is a short Python 2 example:

Performance data via the SkyLIGHT PVX API and Python
Illustration 2: Python code example

As of SkyLIGHT PVX version 5.x, the new PVQL query language allows you to access any PVX metric normally accessible through the PVX API while staying within the PVX environment. See the PVX 5.0 release notes for more information.