Welcome to Questions - Ask OpenNMS, where you can ask questions and receive answers from other members of the community.

Custom graph is not displayed

0 votes
1,570 views

Hi all,

i am fighting few weeks with configuration of graphs and still no success. Seems i am very close to view graphs in opennms, but probably i am still missing something.

When i configured my custom graph so jrb file is created and also successfuly updated. When i open jrb file with jrobin-inspector so i can see some historic data in file.

With all this things no graph is displayed on page(Node-level Performance Data). Could someone help me with troubleshooting what's wrong?

Output of datacollection a graph-properties file ale below:

Lines in bold are that one what i added

 

<?xml version="1.0" encoding="UTF-8"?>
<datacollection-group name="Fortinet-Fortigate-System-v5.2">
<resourceType name="fgProcessorEntIndex" label="Fortigate Processor"
              resourceLabel="CPU: ${fgProcEntIndex}">
  <persistenceSelectorStrategy class="org.opennms.netmgt.collection.support.PersistAllSelectorStrategy"/>
  <storageStrategy class="org.opennms.netmgt.collection.support.IndexStorageStrategy"/>
</resourceType>
<resourceType name="fgVpnSslStatsEntry" label="Fortigate SSL VPN Statistics"
              resourceLabel="Virtual Domain: ${fgVdEntName}">
  <persistenceSelectorStrategy class="org.opennms.netmgt.collection.support.PersistAllSelectorStrategy"/>
  <storageStrategy class="org.opennms.netmgt.collection.support.IndexStorageStrategy"/>
</resourceType>
<resourceType name="fgVdEntIndex" label="Fortigate VDOM Session"
              resourceLabel="Virtual Domain: ${fgVdEntName}">
  <persistenceSelectorStrategy class="org.opennms.netmgt.collection.support.PersistAllSelectorStrategy"/>
  <storageStrategy class="org.opennms.netmgt.collection.support.IndexStorageStrategy"/>
</resourceType>

 
<group name="fgSessVdTable" ifType="all">
    <mibObj oid=".1.3.6.1.4.1.12356.101.3.2.1.1.2" instance="fgVdEntIndex" alias="fgVdEntName" type="String" />
    <mibObj oid=".1.3.6.1.4.1.12356.101.3.2.1.1.7" instance="fgVdEntIndex" alias="fgVdEntSesCount" type="Gauge32" />
  </group>

  <systemDef name="Fortinet-Fortigate-System-v5.2">
    <sysoidMask>.1.3.6.1.4.1.12356.</sysoidMask>
    <collect>
      <includeGroup>fgSysteminfo</includeGroup>
      <includeGroup>fgProcessorTable</includeGroup>
      <includeGroup>fgVpnSslStatsTable</includeGroup>
      <includeGroup>fgSessVdTable</includeGroup>
    </collect>
  </systemDef>
</datacollection-group>

 

##############################################################################
##
## Please add report definition in a new line to make it easier
## for script based sanity checks
##
##################################################

reports=fortinet.fgSysCpuUsage, \
fortinet.fgSysMem, \
fortinet.fgSysDisk, \
fortinet.fgSysLowMem, \
fortinet.fgSysSesCount, \
fortinet.fgSysSesRate, \
fortinet.fgSysSes6Count, \
fortinet.fgSysSes6Rate, \
fortinet.fgProcessorPkt, \
fortinet.fgProcUsage, \
fortinet.fgProcSpaceUsage, \
fortinet.fgVpnSslStatsUser, \
fortinet.fgVpnSslStatsSessions, \
fortinet.fgVpnSslStatsTunnels, \
fortinet.fgVdEntSesCount

.
.
.
.
.

report.fortinet.fgVdEntSesCount.name=Fortigate VDOM System Session IPv4
report.fortinet.fgVdEntSesCount.columns=fgVdEntSesCount
report.fortinet.fgVdEntSesCount.type=nodeSnmp
report.fortinet.fgVdEntSesCount.command=--title="Fortigate VDOM Session IPv4" \
 --vertical-label="number" \
 DEF:val1={rrd1}:fgVdEntSesCount:AVERAGE \
 AREA:val1#729fcf \
 LINE1:val1#3465a4:"Number of Sessions" \
 GPRINT:val1:AVERAGE:" Avg \\: %8.2lf %s" \
 GPRINT:val1:MIN:"Min \\: %8.2lf %s" \
 GPRINT:val1:MAX:"Max \\: %8.2lf %s\\n"

Thanks,

Jan

 

OpenNMS version
16.0.2
asked Jul 17, 2015 by fanhanes (150 points)
edited Jul 17, 2015 by fanhanes

1 Answer

0 votes

Can you change from

report.fortinet.fgVdEntSesCount.type=nodeSnmp

to

report.fortinet.fgVdEntSesCount.type=fgVdEntIndex

you probably want also use the Name like this

report.fortinet.fgVdEntSesCount.propertiesValues=fgVdEntName

which you can use in your graph title as {fgVdEntName}

In hope it helps

-rt

answered Jul 17, 2015 by indigo (11,480 points)
Thanks for answer but your suggestion didn't help me. I restarted opennms for sure and graph is still not displayed.

One thing what i noticed is that jrb file which i wish to graph is in /var/opennms/rrd/snmp/10/fgVdEntIndex directory, while root graph directory of this node is  /var/opennms/rrd/snmp/10/
the fgVdEntIndex directory is fine, that is the reason to change the type from nodeSnmp which means this metrics exist just once on a node, to fgVdEntIndex which means, there are several instances with metrics. Can you please look in the web.log when you try to load a graph or the list of graphs? There must be an exception which explains why the graph rendering doesn't work.
yes there is some exception in web.log but it has more than 8000 characters. Is it possible to attach some file to this discussion?

here is just part of exception:

2015-07-14 16:37:18,804 WARN  [qtp1525177305-9416 - /opennms/rest/measurements/node10.nodeSnmp10/fgVdEntSesCount?start=-7200000&maxrows=30&aggregation=AVERAGE] o.o.n.d.s.DefaultResourceDao: resource ID 'node10.nodeSnmp10' does not match pattern '([^\[]+)\[([^\]]*)\](?:\.|$)' at 'node10.nodeSnmp10'
2015-07-14 16:37:18,804 ERROR [qtp1525177305-9416 - /opennms/rest/measurements/node10.nodeSnmp10/fgVdEntSesCount?start=-7200000&maxrows=30&aggregation=AVERAGE] o.o.w.r.m.f.AbstractRrdBasedFetchStrategy: No resource with id: node10.nodeSnmp10
2015-07-14 16:37:18,804 ERROR [qtp1525177305-9416 - /opennms/rest/measurements/node10.nodeSnmp10/fgVdEntSesCount?start=-7200000&maxrows=30&aggregation=AVERAGE] o.o.w.r.MeasurementsRestService: Resource or attribute not found for QueryRequest{Step=300000, Start=1436877438801, End=1436884638801, Sources=[Source{Label=fgVdEntSesCount, Resource ID=node10.nodeSnmp10, Attribute=fgVdEntSesCount, Transient=false}], Expressions=[]}
2015-07-14 16:41:02,619 WARN  [qtp1525177305-9482 - /opennms/rest/measurements/node%5B10%5D.nodeSnmp%5B10%5D/fgVdEntSesCount?start=-7200000&maxrows=30&aggregation=AVERAGE] o.o.n.d.s.DefaultResourceDao: Could not get resource for resource ID "node[10].nodeSnmp[10]"
org.springframework.orm.ObjectRetrievalFailureException: Object of class [org.opennms.netmgt.model.OnmsResource] with identifier [Unsupported name '10' for node SNMP resource type.]: not found
    at org.opennms.netmgt.dao.support.NodeSnmpResourceType.getChildByName(NodeSnmpResourceType.java:115) ~[opennms-dao-16.0.2.jar:?]
    at org.opennms.netmgt.dao.support.DefaultResourceDao.getChildResource(DefaultResourceDao.java:469) ~[opennms-dao-16.0.2.jar:?]
    at org.opennms.netmgt.dao.support.DefaultResourceDao.getResourceById(DefaultResourceDao.java:373) [opennms-dao-16.0.2.jar:?]
Hi, it seems that it's not rendering any graph which is under next folder under root node folder. I have a lot of graphs which are generated by default(no changes were made in graphs ) and all graphs which are "hidden" under this folder are not displayed.
Any suggestion ?
...