Showing posts with label ReporterAnalyzer NFA. Show all posts
Showing posts with label ReporterAnalyzer NFA. Show all posts

Friday, December 12, 2014

Enabling or Disabling the Flow Cloner in RA9.0

I know, 9.0 is an old version, but I had a customer who is transitioning and needed to temporarily enable and disable cloning of flows from the old harvesters to the new harvesters. Here's the resulting script. The first argument should be Y or N depending on whether you want to enable (Y) or disable (N) the flow cloner. The second argument is optional and is the IP address you want to clone to. If you specify the IP address, the flowclonedef.ini file is created. If you don't specify it, no changes are made.

Monday, November 11, 2013

Preparing Windows 2008 for NetQoS Installations

UPDATE: I've added the ability to disable IPv6 and configure SNMP with default settings (public community string and access from any host). I've also corrected the spelling in two places.

UPDATE: There have been several changes lately that I haven't published out here on the blog.  Suffice it to say that you can now re-run the script and choose which parts to run and which parts not to run.  You are prompted with a yes/no dialog before each section of the script runs.  Also, the .Net 4.0 uninstaller now runs as a part of the script.  It runs right before Windows Updates and will reboot if .Net 4.0 is uninstalled.  You'll need to rerun the script if you want it to run Windows Updates for you.
I've got some ambitious plans for the next version.  I want the script to allow you to run it once manually and it will create a response file.  That response file can then be used to repeat the script on any number of servers.  So, if you want to only run certain parts, the first time you manually run it will create an output file with that info.  Then you can use that output file as an input for future runs.  This should make preparing a bunch of w2k8 servers easier.

There are a bunch of things that have to be done to a Windows 2008 server before the NetQoS software can be installed.  Being the efficient (aka lazy) engineer that I am, I decided to script the whole thing.  Here are each of the pieces of my script.  Download the whole thing here.  If you want to run the script without copying and pasting each piece, you must run 'set-executionpolicy remotesigned -forced' first.  Otherwise powershell doesn't allow the script to run.  I usually copy and paste each part so I see each part as it happens.








Tuesday, April 16, 2013

Finding the data source for a particular device in NPC

Recently, we needed to know which data source was contributing to the report data for a particular device in NPC.  This was fairly easy to find out given a simple query:

mysql -P 3308 -D netqosportal -e "select a.itemname as Device, v6_ntoa(a.address) as Address, b.consolename as DataSource from dst_device as a, data_sources2 as b where a.sourceid=b.sourceid and itemname like '%devicename%' order by a.itemname;"

Simply replace devicename with the device name and execute this at a command prompt on the NPC server.  The result should look something like this:
+------------------------+-----------------+----------------------+
| Device                 | Address         | DataSource           |
+------------------------+-----------------+----------------------+
| center                 | 192.168.100.2   | NetVoyant            |
| nacogdoches            | 192.168.100.3   | NetVoyant            |
| nacogdoches            | 192.168.100.3   | ReporterAnalyzer     |
| houston                | 192.168.100.4   | ReporterAnalyzer     |
| houston                | 192.168.100.4   | NetVoyant            |
| dallas                 | 192.168.100.5   | ReporterAnalyzer     |
| dallas                 | 192.168.100.5   | NetVoyant            |
| sanfelipe              | 192.168.100.6   | ReporterAnalyzer     |
| sanfelipe              | 192.168.100.6   | NetVoyant            |
| austin                 | 192.168.100.7   | ReporterAnalyzer     |
| austin                 | 192.168.100.7   | NetVoyant            |
| elpaso                 | 192.168.100.8   | NetVoyant            |
| brownsville            | 192.168.100.9   | NetVoyant            |
| beaumont               | 192.168.100.10  | NetVoyant            |
| lufkin                 | 192.168.100.11  | NetVoyant            |
| ftworth                | 192.168.100.12  | NetVoyant            |
| ftworth                | 192.168.100.12  | ReporterAnalyzer     |
| tyler                  | 192.168.100.13  | ReporterAnalyzer     |
| tyler                  | 192.168.100.13  | NetVoyant            |
| henderson              | 192.168.100.14  | NetVoyant            |
| amarillo               | 192.168.100.15  | NetVoyant            |
| amarillo               | 192.168.100.15  | ReporterAnalyzer     |
| sanantonio             | 192.168.100.16  | NetVoyant            |
| bexar                  | 192.168.100.17  | NetVoyant            |
+------------------------+-----------------+----------------------+

It would be nice if NPC or the new CAPC had some kind of feature that showed the datasource(s) for a particular object on the device details page.

Wednesday, January 16, 2013

Automating NFA Parser Reports

UPDATE: CA Support has endorsed the NAST tool as the replacement for the NFAParser.  I haven't tested it, but if it's like the other updated tools it will run faster.  The nice thing is that the syntax for running the NAST tool silently is the same as the NFAParser.  So, it doesn't take much to update this tool to use the new tool.

A while back I was tasked with making it possible to view NFA Parser output inside NPC.  It was actually easier than I thought.  I came up with something that isn't as optimal as I would like it (I'll explain why later), but it works for now.

The first thing you have to do is to download the NFA Parser which is part of CA's Support Tools 6 and copy it to each harvester. If you don't want to use all the tools, you can just download the parser and put it on each harvester.  The output of the parser is an HTML file which is ready to be published to a web service so you can link to it from NPC.  The easiest way to do this is to call the parser with a working directory of C:\inetpub\wwwroot on the harvester.  That way the output will be put in that directory, ready to be viewed in a browser.  However, every time you run the parser, the output file's name contains a date/time stamp, so that makes it a little difficult to link to.  The solution is to wrap it all in a batch file that clears the old output, calls the new output, then renames the new output to some static name.  Here's what that batch script would look like:


This could be tweaked a bit to keep the last X files using the following batch script:


This second option moves the existing files up in a queue by renaming them with a higher name, except for the highest one that gets deleted.  So, if I created a scheduled task like this: C:\inetpub\wwwroot\nfa.bat 1 5, I would eventually end up with 5 files, each one representing one of the last 5 runs with nfaout1.htm being the most recent, each spanning 1 minute.  This second method is the option I'm using in production and it seems to work just fine.  In order to easily give access to the files, I create an HTML table with a column for the servers then a column for each of the retained reports.  Then I put in a row for each harvester.  I put that HTML in my custom content directory and load it into a browser view.


Obviously running the report more frequently and with a longer timespan will increase load on the harvester, so don't turn it on to run for 1 minute every minute.

Monday, January 7, 2013

RA Router List through ODBC

Continuing my effort to document the various ways I've used the ODBC connector for the NetQoS products, here's my next query and controls I've built and that I use in production.  Today's query comes from a need to view the router status for all routers monitored by ReporterAnalyzer (NFA).  The goal is to show a list of the routers along with the address from which RA is receiving Netflow, along with which harvester it's assigned to, how many interfaces have been discovered, how many are enabled, when the router last rebooted, when the last refresh was, and when it was last discovered.  Here's the SelectCommand and OdbcConnection String to put in the configuration.xml:


To create the view, run the following SQL commands against the NPC server:

Thursday, July 12, 2012

GXMLG 2.0

I finally broke down and rebuilt my GXMLG tool.  Given the complexity of the task, I originally wrote the applet using MS Access.  However, to make things easier to distribute and easier to troubleshoot and use, version 2.0 uses perl and is run from the command line.  To illustrate the difference, the old utility was 6.5MB.  The new script is 11KB.  That's what a graphical interface gives you.



You'll have to install perl (I use strawberry perl on windows boxes) and run the script like this:
>perl gxmlg.pl
Running it without any arguments shows you the help file:
This script outputs any combination of configuration files for the NetQoS
suite of products. You must install strawberry perl and Text::CSV,
Text::CSV_XS, and Getopt::Long. To install CPAN modules, run cpan [module name]
from the command prompt.

Example: cpan Text::CSV

This script was created by Stuart Weenig (C)2012.  For more information visit
http://stuart.weenig.com. This script may be redistributed as long as all the
files are kept in their original state.


Current Version: 2.0

Usage: PERL gxmlg.pl [-outnpcxml] [-outsacsv] [-outnvcsvnv] [-outucmcsv]
                     [-infile NAMEOFINFILE] [-npcinspath INSERTPATH]
                     [-npcxmlname NPCXMLFILE] [-sacsvname SACSVFILE]
                     [-nvcsvname NVCSVFILE] [-ucmcsvname UCMCSVFILE]

    -infile NAMEOFINFILE        Specifies the name of the Sites file to be
                                imported. (If omitted: sites.csv)
    -outnpcxml                  Output an NPC XML groups definition file.
    -npcxmlname NPCXMLFILE      Name of the NPC file to be output. (If
                                omitted: NPCGroups.xml)
    -npcinspath INSERTPATH      The path to the group that will serve as
                                the insertion point.  Required if using
                                -outnpcxml option.
    -outsacsv                   Output a SA networks CSV file.
    -sacsvname SACSVFILE        Name of the SA file to be output. (If omitted:
                                SANetworks.csv)
    -outnvcsv                   Output a NV discovery scopes file.
    -nvcsvname NVCSVFILE        Name of the NV file to be output. (If omitted:
                                NVScopes.csv)
    -outucmcsv                  Output a UCMonitor locations file.
    -ucmcsvname UCMCSVFILE      Name of the UCMonitor locations file to be output.
                                (If omitted: UCMLocations.csv)

You must install strawberry perl and Text::CSV, Text::CSV_XS, and Getopt::Long.
To install CPAN modules, run cpan [module name] from the command prompt
Example: cpan Text::CSV

If the server you will be running this on doesn't have access to the internet, you
won't be able to install the modules automatically (since they have to be downloaded
from the internet).  The solution is to download the tarballs from www.cpan.org and
extract them using winzip or winrar or 7z.  You might need to extract several times
until you get just the folder with the files in them.  Then copy them to your server.
Open a command prompt and cd to the directory containing Makefile.pl (you'll have to
do this for each module).  Then execute the following:

     perl Makefile.pl && dmake && dmake test && dmake install

For the text modules, do Text::CSV first, then Text::CSV_XS.

The script itself is pretty simple.  Specify an input file.  This input file is the same sites/networks file referenced in my previous blog post.  Here's a sample sites list to get you started.  Then just decide which output files you want.  If you specify the npc output file, you'll also need to specify the insertion point (more information about the insertion point).

If you don't have internet access on the box, you won't be able to install the Text::CSV modules to install (since they come from the internet).  The solution is to download the Text::CSV and Text::CSV_XS tarballs and extract them using winzip or winrar or 7z.  You might need to extract several times until you get just the folder with the files in them.  Then copy them to the NVMC.  Open a command prompt and cd to the directory containing Makefile.pl (you'll have to do this for each one).  Then execute the following:

perl Makefile.PL && dmake && dmake test && dmake install

Do Text::CSV first, then Text::CSV_XS.

Monday, July 9, 2012

CA Network Flow Analyzer

Back in May, I gave a presentation for the CA Infrastructure Management Global User Community.  At the time, it was recorded using Microsoft's LiveMeeting recording feature.  For some reason, PowerPoint animations don't get recorded correctly and the recording of my presentation wasn't that great.  So, I've re-recorded my presentation and uploaded it to YouTube.  It also turns out I can now upload videos longer than the default 15 minute limit.  Cool!
Anyway, here's the video: