@Override public boolean isMeridian() { return sysInfoUtils.getPackageName().contains("meridian"); }
public UsageStatisticsReportDTO generateReport() { final SystemInfoUtils sysInfoUtils = new SystemInfoUtils(); final UsageStatisticsReportDTO usageStatisticsReport = new UsageStatisticsReportDTO(); // Unique system identifier try { usageStatisticsReport.setSystemId(m_stateManager.getOrGenerateSystemId()); } catch (IOException e) { LOG.warn("An error occurred while retrieving the system id. " + "The usage report will be submitted with a null system id.", e); } // Operating System usageStatisticsReport.setOsName(System.getProperty("os.name")); usageStatisticsReport.setOsArch(System.getProperty("os.arch")); usageStatisticsReport.setOsVersion(System.getProperty("os.version")); // OpenNMS version and flavor usageStatisticsReport.setVersion(sysInfoUtils.getVersion()); usageStatisticsReport.setPackageName(sysInfoUtils.getPackageName()); // Object counts usageStatisticsReport.setNodes(m_nodeDao.countAll()); usageStatisticsReport.setIpInterfaces(m_ipInterfaceDao.countAll()); usageStatisticsReport.setSnmpInterfaces(m_snmpInterfaceDao.countAll()); usageStatisticsReport.setMonitoredServices(m_monitoredServiceDao.countAll()); usageStatisticsReport.setEvents(m_eventDao.countAll()); usageStatisticsReport.setAlarms(m_alarmDao.countAll()); // Node statistics usageStatisticsReport.setNodesBySysOid(m_nodeDao.getNumberOfNodesBySysOid()); return usageStatisticsReport; }
public UsageStatisticsReportDTO generateReport() { final SystemInfoUtils sysInfoUtils = new SystemInfoUtils(); final UsageStatisticsReportDTO usageStatisticsReport = new UsageStatisticsReportDTO(); // Unique system identifier try { usageStatisticsReport.setSystemId(m_stateManager.getOrGenerateSystemId()); } catch (IOException e) { LOG.warn("An error occurred while retrieving the system id. " + "The usage report will be submitted with a null system id.", e); } // Operating System usageStatisticsReport.setOsName(System.getProperty("os.name")); usageStatisticsReport.setOsArch(System.getProperty("os.arch")); usageStatisticsReport.setOsVersion(System.getProperty("os.version")); // OpenNMS version and flavor usageStatisticsReport.setVersion(sysInfoUtils.getVersion()); usageStatisticsReport.setPackageName(sysInfoUtils.getPackageName()); // Object counts usageStatisticsReport.setNodes(m_nodeDao.countAll()); usageStatisticsReport.setIpInterfaces(m_ipInterfaceDao.countAll()); usageStatisticsReport.setSnmpInterfaces(m_snmpInterfaceDao.countAll()); usageStatisticsReport.setMonitoredServices(m_monitoredServiceDao.countAll()); usageStatisticsReport.setEvents(m_eventDao.countAll()); usageStatisticsReport.setAlarms(m_alarmDao.countAll()); // Node statistics usageStatisticsReport.setNodesBySysOid(m_nodeDao.getNumberOfNodesBySysOid()); return usageStatisticsReport; }