Knowledge BaseMetrics & Reports Data CollectionI'm getting an "Error parsing DataCollector json result" while validating, collecting data, and updating charts. Why?

I'm getting an "Error parsing DataCollector json result" while validating, collecting data, and updating charts. Why?

ISSUE

While validating, collecting data, and updating charts, I am getting an "Error parsing DataCollector json result" error. What is going on here?

RESOLUTION

There are a couple of reasons why this error can occur:

A.) The permissions for /opt/mi/iv/data/temp/datacollector/data are wrong. Update the permissions by running this command directly on the Metric Insights server:

chmod 777 /var/www/iv/data/temp/datacollector/data.


For example:

root@mi-server:/var/www/iv/data/temp/datacollector# ls -ld data

drwxr-xr-x 2 root root 4096 Jan 20 14:03 data

root@mi-server:/var/www/iv/data/temp/datacollector# chmod 777 data

A permissions issue can be determined by checking /var/log/mi.error. You'll see an error similar to:

/var/www/generator/report_validator.py data_fetch 508:Error parsing incoming json data:
Oct 25 09:47:10 mi-server 2013-10-25 09:47:10:MetricInsightsGenerator:/var/www/generator/report_validator.py data_fetch 508:
Warning: file_put_contents(/var/www/iv/data/temp/datacollector/data/1382662030_97059400): failed to open stream: Permission denied in /var/www/iv/engine/libs/Custom/Broker/Abstract.php on line 267

 

 

B.) The /opt/mi/datacollector/lib/logback.xml file is pointing to the wrong logs directory for insight.log and query.log. The logback.xml file must be able to locate the aforementioned logs in order to update for each action taken in Metric Insights. To fix, open logback.xml in an editor (vi, vim) and locate the tags <file> and <fileNamePattern>. These two should be pointing to:

/var/log/insight in Metric Insights version 3.x

or

/opt/mi/datacollector/logs in Metric Insights version 4.x.

 

For example, the <file> tag may have been something like: 

<file>${mi.insightd_dir}/logs/query.log</file>

but ${mi.insightd_dir} is not yet a declared variable for version 3.x. Either declare that variable, or explicitly point it to the right directory based on the version of MI installed.

This error was found by viewing /var/log/mi.error. You'll see an error similar to:

2016-04-26 13:09:07:MetricInsightsGenerator:/var/www/generator/report_generator.py 1820 0 -edcd_id 11957:Error parsing incoming json data:
Apr 26 13:09:07 mi-server 2016-04-26 13:09:07:MetricInsightsGenerator:/var/www/generator/report_generator.py 1820 0 -edcd_id 11957:13:09:03,574 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy] 13:09:03,576 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 13:09:03,576 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/var/www/datacollector/lib/logback.xml] 13:09:04,151

0 Comments

Add your comment

E-Mail me when someone replies to this comment