Archive

Tech Tip - Searching for polling errors 

08-10-2015 11:27 AM

When you run a report and see an element is showing No Data, one of the first steps to take is to check and see if that element has any polling errors.  While there are many ways for searching for polling errors, grep is among the quickest as well as OS independent due to nutcracker.

 

Here are a few examples that search all messages.stats logs to include .bak and .bak.bak if they exist:

 

1.

grep -ic CPU $NH_HOME/log/pollerStatus/messages.stats*

 

/ehealth/log/pollerStatus/messages.stats.log:308

/ehealth/log/pollerStatus/messages.stats.log.bak:538

 

2.

grep -i -B 1 CPU $NH_HOME/log/pollerStatus/messages.stats*

 

/ehealth/log/pollerStatus/messages.stats.log.bak-Monday, 08/10/2015 10:26:04 AM

/ehealth/log/pollerStatus/messages.stats.log.bak:Pgm nhiPoller[Net]: 'Sim:CPU-9-0': received an SNMP error (the request referenced an incorrect community or index, or an unsupported MIB) (Variable not found is starCPUMemUsed).

--

/ehealth/log/pollerStatus/messages.stats.log.bak-Monday, 08/10/2015 10:26:05 AM

/ehealth/log/pollerStatus/messages.stats.log.bak:Pgm nhiPoller[Net]: 'Sim:CPU-9-1': received an SNMP error (the request referenced an incorrect community or index, or an unsupported MIB) (Variable not found is starCPUMemUsed).

 

etc....

 

3.

grep -ih -B 1 CPU $NH_HOME/log/pollerStatus/messages.stats*

 

Monday, 08/10/2015 10:26:04 AM

Pgm nhiPoller[Net]: 'Sim:CPU-9-0': received an SNMP error (the request referenced an incorrect community or index, or an unsupported MIB) (Variable not found is starCPUMemUsed).

--

Monday, 08/10/2015 10:26:05 AM

Pgm nhiPoller[Net]: 'Sim:CPU-9-1': received an SNMP error (the request referenced an incorrect community or index, or an unsupported MIB) (Variable not found is starCPUMemUsed).

 

etc....

 

The basic syntax of the above examples are; grep <switches> <search term> <file location>.  The switch -i means case insensitive, -c stands for count and lastly -B 1 grabs the prior line (timestamp in this case) to any matches.  If you do NOT wish for the path and filename to be included in the output use the -h switch.

 

If you make the search term unique to what you are looking for (a hostname usually works well) you can find polling errors in the blink of an eye.

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.