logfile monitoring -problem in datacollection

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

logfile monitoring -problem in datacollection

vijaya
Hi,

How to do logfile monitoring?
as per documented in opennms
i did as like

1st step :
snmpd.config

logmatch security /var/log/secure  600  authentication failure
sysObjectID.1.3.6.1.4.1.8072.3.2.10

2nd step:

and i created new file in datacollection directory called as logmatch.xml

<?xml version="1.0"?>
<datacollection-group name="Logmatch">
         <resourceType name="logMatchIndex" label="NetSnmp Log Match"
                  resourceLabel="${logMatchName} RegEx - ${logMatchRegEx}">
      <persistenceSelectorStrategy class="org.opennms.netmgt.collectd.PersistAllSelectorStrategy"/>
      <storageStrategy class="org.opennms.netmgt.dao.support.IndexStorageStrategy"/>
    </resourceType>

     

      <group name="NetSnmp Log-Match" ifType="all">
       <mibObj oid=".1.3.6.1.4.1.2021.16.2.1.2" instance="logMatchIndex" alias="logMatchName" type="string" />
        <mibObj oid=".1.3.6.1.4.1.2021.16.2.1.4" instance="logMatchIndex" alias="logMatchRegEx" type="string" />
        <mibObj oid=".1.3.6.1.4.1.2021.16.2.1.5" instance="logMatchIndex" alias="logMatchGlobCnt" type="Counter32" />
        <mibObj oid=".1.3.6.1.4.1.2021.16.2.1.6" instance="logMatchIndex" alias="logMatchGlobInt" type="Integer" />
      </group>


        <systemDef name="NetSnmp Log Match">
        <sysoidMask>.1.3.6.1.4.1.8072.3.2.10</sysoidMask>
        <collect>
          <includeGroup>mib2-host-resources-system</includeGroup>
          <includeGroup>mib2-host-resources-memory</includeGroup>
          <includeGroup>net-snmp-disk</includeGroup>
          <includeGroup>ucd-loadavg</includeGroup>
          <includeGroup>ucd-memory</includeGroup>
          <includeGroup>ucd-sysstat</includeGroup>
          <includeGroup>ucd-diskio</includeGroup>
          <includeGroup>NetSnmp Log-Match</includeGroup>
        </collect>
      </systemDef>



</datacollection-group>

3rd step:
i included that xml file in datacollection file

<include-collection dataCollectionGroup="Logmatch"/>


3rd step:snmp-graph.properties

report.juniper-sbr.logmatch.name=SBR log matches per minute
report.juniper-sbr.logmatch.columns=logMatchGlobCnt
report.juniper-sbr.logmatch.type=logMatchIndex
report.juniper-sbr.logmatch.command=--title="Matches per minute" \
DEF:val1={rrd1}:logMatchGlobCnt:AVERAGE \
CDEF:valpermin=val1,60,* \
LINE2:valpermin#0000ff:"Rate " \
GPRINT:valpermin:AVERAGE:" Avg  \\: %8.2lf %s" \
GPRINT:valpermin:MIN:"Min  \\: %8.2lf %s" \
GPRINT:valpermin:MAX:"Max  \\: %8.2lf %s\\n"

report.juniper-sbr.logmatchint.name=SBR total log matches
report.juniper-sbr.logmatchint.columns=logMatchGlobInt
report.juniper-sbr.logmatchint.type=logMatchIndex
report.juniper-sbr.logmatchint.command=--title="Total Match counts" \
 --units-exponent 0  \
DEF:val1={rrd1}:logMatchGlobInt:AVERAGE \
LINE2:val1#0000ff:"Counts " \
GPRINT:val1:AVERAGE:" Avg  \\: %8.2lf %s" \
GPRINT:val1:MIN:"Min  \\: %8.2lf %s" \
GPRINT:val1:MAX:"Max  \\: %8.2lf %s\\n"



but I m not able to collect data .its giving error if i check collectd logfile its showing as groups and sytems and resourcetype expected.
i guess thier s xml parser error .do i need to change in anyfile to collect data on mibobjid.

and also im getting error operation not permitted f i check output.log file daemon directory.

how to generate resource graph on console???

need immediate help.

thanks

Loading...