Bug #4087
closed
Simple view not responding with default rendering
Added by Lequeux Olivier over 12 years ago.
Updated over 12 years ago.
Description
With the following configuration myTest is not responding. We have to specify accept or contentType in config view to get the view.
A Curl command seems working.
<view name="nagios_status_expert">
<info>
<category>primary</category>
<description>Statuts des sondes du Nagios "expert"</description>
</info>
<connector type="HTTPConnector">
<parameter name="url">http://ccsvli39.in2p3.fr/nagios_status.xml</parameter>
</connector>
<cache type="FileCache">
<trigger type="ViewNotifiedTrigger"></trigger>
</cache>
<rendering contentType="application/xml"/>
</view>
<view name="myTEST">
<connector type="XMLConnector">
<parameter name="content" type="ViewParameter">nagios_status_expert</parameter>
</connector>
</view>
NOT WORKING :
http://ccleol:8080/lavoisier/myTEST
WORKING :
http://ccleol:8080/lavoisier/myTEST?accept=xml
Same behaviour with #47 version WITH jersey (25-Feb-2013 17:15)
WORKING WITH :
- JERSEY #47
just replacing connector :
<connector type="XMLConnector">
<parameter name="content">
<![CDATA[
<root>
<child first="1"/>
<child second="2"/>
</root>
]]>
</parameter>
OR with a subset of original data :
<connector type="XMLConnector">
<parameter name="content">
<![CDATA[
<services>
<service host_name="VIRTUAL" service_description="Check ALARME EDF Poste de garde" last_hard_state="0" nagios="expert"/>
<service host_name="VIRTUAL" service_description="Check ARMOIRE B in vill1" last_hard_state="0" nagios="expert"/>
<service host_name="VIRTUAL" service_description="Check ARMOIRE E in vill1" last_hard_state="0" nagios="expert"/>
<service host_name="VIRTUAL" service_description="Check ARMOIRE N in vill1" last_hard_state="0" nagios="expert"/>
<service host_name="VIRTUAL" service_description="Check ARMOIRE O in vill1" last_hard_state="0" nagios="expert"/>
<service host_name="VIRTUAL" service_description="Check GE jobs global efficiency" last_hard_state="1" nagios="expert"/>
<service host_name="VIRTUAL" service_description="Check GROUPE ELEC in vill1" last_hard_state="0" nagios="expert"/>
<service host_name="ccadonis00-p1" service_description="Ping" last_hard_state="0" nagios="expert"/>
<service host_name="ccadonis00-p2" service_description="Ping" last_hard_state="0" nagios="expert"/>
<service host_name="ccapc-a01" service_description="Ping" last_hard_state="0" nagios="expert"/>
<service host_name="ccapc-a01" service_description="TRAP" last_hard_state="0" nagios="expert"/>
<service host_name="ccapc-a01-p1" service_description="Ping" last_hard_state="0" nagios="expert"/>
<service host_name="ccapc-a02" service_description="Ping" last_hard_state="0" nagios="expert"/>
</services>
]]></parameter>
</connector>
myTest view is not related to this behaviour, we can reproduce this bug with following conf.
h2.Tests conclusion
- Default rendering on client side is awfully longer than the one on server side, seems proportional to data volume.
- stats /// 293 data lines = > default rendering /accept=html = 120 !!!!!
- JERSEY #25 (15-Jan-2013)
- confi g :
<view name="nagios_status_expert">
<info>
<category>primary</category>
<description>Statuts des sondes du Nagios "expert"</description>
</info>
<connector type="HTTPConnector">
<parameter id="url">http://ccsvli39.in2p3.fr/nagios_status.xml</parameter>
</connector>
<cache type="FileCache">
<trigger type="ViewNotifiedTrigger"></trigger>
</cache>
<!--<rendering contentType="application/xml"/>-->
</view>
WORKAROUND
<row foreach='/services/service'>
<column label="host_name">@host_name</column>
<column label="service_description">@service_description</column>
<column label="last_hard_state">@last_hard_state</column>
<column label="nagios">@nagios</column>
</row>
</rendering>
- Status changed from New to Resolved
- Assigned To set to Reynaud Sylvain
- % Done changed from 0 to 100
simplified the process that finds the list of attributes to be converted into columns
Also available in: Atom
PDF