Watch4net APG 5: Script that pushed data to APG Backend is not working
search cancel

Watch4net APG 5: Script that pushed data to APG Backend is not working


Article ID: 304644


Updated On:





Script that pushed data to Watch4net APG 5 Backend is not working

Script that pushed data to APG Backend returns this error message in the cache log:

WARNING -- [2007-03-03 15:10:10 PST] -- Cache::addData(): dropping invalid raw value.


VMware Smart Assurance - Watch4Net/M&R


If you encounter this issue in your environment, do the following:

Verify the syntax of the data string you are sending to APG (if you are not using the APG Java Collector API). Make sure it has the following syntax:


\t915148798\texternal\tCPU_cpu1_MyWindowsServer\t8.0\tsource=Nagios\tpartty pe=Processor\tpart=cpu1\tdevice=MyWindowsServer\tname=CurrentUtilization\tde vtype=Host\tdevdesc=Windows\tmodel=Dell\tlocation=EMEA\tip=\tcontact=Admin\tunit=%

Note that the timestamp is in Unix time format. The value cannot be left empty. A value must absolutely be set or else the raw value will generate an exception. The following string will fail:

\t915148798\texternal\tCPU_cpu1_MyWindowsServer\tsource=Nagios\tpartty pe=Processor\tpart=cpu1\tdevice=MyWindowsServer\tname=CurrentUtilization\tde vtype=Host\tdevdesc=Windows\tmodel=Dell\tlocation=EMEA\tip=\tcontact=Admin\tunit=%

Before sending a raw value, you will need to test if you actually have a value to send. If not, you can set the timestamp to -1. In that case, only the properties in the raw value will be processed. Also, you can simply omit to send the data string. APG will consider this as if there was no data available for that period (blank spot in the reports).

Make sure the group you are using is defined in the APG configuration file. If not, you need to edit config.xml located in <APG installation dir>/APG-Backend/conf. Locate the node "groups". Add a "group" element corresponding to the one in the raw value you are pushing as in the following example

Example config.xml:

<group name="external">
     <!-- For each aggregate defined in the aggregates configuration file mentionned below, there should be one element here describing the span-time retention to use. The name attribute only stands here as an ID that references the aggregate defined in the aggregate definition file. -->
        <!-- 1 month retention -->
    </raw> <aggregate name="10min">
         <!-- 1 month duration -->
    </aggregate> <aggregate name="30min">
        <!-- 1 month duration -->
    <aggregate name="1hour">
        <!-- 2 months duration -->
        <span-time>5356800</span-time> </aggregate>
    <aggregate name="2hours">
        <!-- 2 months duration -->
    </aggregate> <aggregate name="1day">
         <!-- 1 year duration -->
    <aggregate name="1week">
         <!-- 7 years duration -->