Bean name with slashes must be escaped on jrb creation
Description
Environment
Acceptance / Success Criteria
Lucidchart Diagrams
Activity

Alejandro Galue November 3, 2013 at 8:54 AM
Fixed on revision c7cb8b8e223580480426d586d017c9734a544971 for 1.12
1.12.2 is going to have a new feature called "post-install/upgrade tools". It contains a tool for JMX designed to fix all the existing JRBs/RRDs as well as the JMX data collection configuration files and graph templates.
Even if the tools have JUnit tests and were properly tested with real migrations, please create a full backup of your configuration file and JRBs/RRDs prior upgrade.

Steve Hillier February 14, 2012 at 5:23 PM
Matt: It seems to me that we could use an 'alias' field for this use case (when store-by-group feature is enabled) in the mbean object definition in jmx-datacollection-config.xml.
It would eliminate a lot of cases where objectName is simply not suitable for a filename – but I suspect this might have bigger implications. Has anyone investigated this possibility?
Suspect these issues are all related: , , , potentially all resolved by alias field. What do you think?

Ruslan Lutsenko March 11, 2011 at 5:37 PM
Just hit same bug in 1.6.7:
org.opennms.netmgt.rrd.RrdException: An error occured creating rrdfile /opt/OpenNMS/share/rrd/snmp/9/Activemq-JMX/org_apache_activemq_BrokerName_2mba8_Destination_jms/sms-dat/financial-collector_Type_Queue.jrb: java.io.FileNotFoundException: /opt/OpenNMS/share/rrd/snmp/9/Activemq-JMX/org_apache_activemq_BrokerName_2mba8_Destination_jms/sms-dat/financial-collector_Type_Queue.jrb (No such file or directory) :
/var/log/opennms/daemon/collectd.log.1:org.opennms.netmgt.rrd.RrdException: An error occured creating rrdfile /opt/OpenNMS/share/rrd/snmp/9/Activemq-JMX/org_apache_activemq_BrokerName_2mba8_Destination_jms/sms-dat/financial-collector_Type_Queue.jrb: java.io.FileNotFoundException: /opt/OpenNMS/share/rrd/snmp/9/Activemq-JMX/org
Need to collect objectname="org.apache.activemq:BrokerName=2mba8,Destination=jms/sms-dat/financial-collector,Type=Queue"

Wiktor Wodecki November 13, 2009 at 9:40 AM
(In reply to comment #1)
> the problem here are really the quotations ". Tried to change the bean to
> something without a slash /, same result
>
strange, new testing revealed the opposite. It's the / causing trouble, not the ". Guess I started wrong opennms version.

Wiktor Wodecki November 13, 2009 at 9:35 AM
the problem here are really the quotations ". Tried to change the bean to something without a slash /, same result
Heya,
I tried to collect the bean Catalina:type=DataSource,class=javax.sql.DataSource,name="jdbc/dataSource/factory" from a tomcat server. This bean represents a jdbc connection pool and is indeed written with quotations. OpenNMS fails to create a jrb file for this:
2009-11-13 14:57:41,551 ERROR [CollectdScheduler-150 Pool-fiber107] RrdUtils: createRRD: An error occured creating rrdfile /opt/opennms/share/rrd/snmp/25/xms_jmx/Catalina_type_DataSource_class_javax_sql_DataSource_name_"jdbc/dataSource/factory".jrb: java.io.FileNotFoundException: /opt/opennms/share/rrd/snmp/25/xms_jmx/Catalina_type_DataSource_class_javax_sql_DataSource_name_"jdbc/dataSource/factory".jrb (No such file or directory)
java.io.FileNotFoundException: /opt/opennms/share/rrd/snmp/25/xms_jmx/Catalina_type_DataSource_class_javax_sql_DataSource_name_"jdbc/dataSource/factory".jrb (No such file or directory)
2009-11-13 14:57:41,551 ERROR [CollectdScheduler-150 Pool-fiber107] GroupPersister: Unable to persist data for Catalina_type_DataSource_class_javax_sql_DataSource_name_"jdbc/dataSource/factory": org.opennms.netmgt.rrd.RrdException: An error occured creating rrdfile /opt/opennms/share/rrd/snmp/25/xms_jmx/Catalina_type_DataSource_class_javax_sql_DataSource_name_"jdbc/dataSource/factory".jrb: java.io.FileNotFoundException: /opt/opennms/share/rrd/snmp/25/xms_jmx/Catalina_type_DataSource_class_javax_sql_DataSource_name_"jdbc/dataSource/factory".jrb (No such file or directory)
org.opennms.netmgt.rrd.RrdException: An error occured creating rrdfile /opt/opennms/share/rrd/snmp/25/xms_jmx/Catalina_type_DataSource_class_javax_sql_DataSource_name_"jdbc/dataSource/factory".jrb: java.io.FileNotFoundException: /opt/opennms/share/rrd/snmp/25/xms_jmx/Catalina_type_DataSource_class_javax_sql_DataSource_name_"jdbc/dataSource/factory".jrb (No such file or directory)
It shouldn't be too difficult to escape such characters in the transformation function.