Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using oid_regexp_parse, filter indexes to those that match #1454

Closed
David-yanp opened this issue Mar 7, 2018 · 11 comments
Closed

When using oid_regexp_parse, filter indexes to those that match #1454

David-yanp opened this issue Mar 7, 2018 · 11 comments
Labels
unverified Some days we don't have a clue

Comments

@David-yanp
Copy link

I'm just want to match two oid 16842753 and 16908289,but other oid was matched,

Is the regex error?

thanks.

XML file:

<interface>
        <name>Get Device CPU Usage</name>
        <index_order_type>numeric</index_order_type>
        <oid_index>.1.3.6.1.2.1.47.1.1.1.1.5</oid_index>
        <oid_index_parse>OID/REGEXP:.*?\.(16[89][04][28][27][58][39])$</oid_index_parse>
        <index_order>Index</index_order>
        <index_order_type>alphabetic</index_order_type>
        <fields>
                <Index>
                        <name>Index</name>
                        <source>index</source>
                        <direction>input</direction>
                </Index>
                <hwEntityCpuUsage>
                        <name>CpuUsage</name>
                        <method>get</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2011.5.25.31.1.1.1.1.5</oid>
                </hwEntityCpuUsage>
        </fields>
</interface>

Data query:

Total: 0, Delta: 0, Running data query [7].
Total: 0, Delta: 0, Found type = '3' [SNMP Query].
Total: 0, Delta: 0, Found data query XML file at '/home/cacti/resource/snmp_queries/huawei_cpu.xml'
Total: 0.01, Delta: 0, XML file parsed ok.
Total: 0.01, Delta: 0, <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
Total: 0.41, Delta: 0.4, Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.47.1.1.1.1.5' Index Count: 245
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16777216' value: '3'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16842752' value: '5'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16842753' value: '9'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16843009' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16843010' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16843520' value: '5'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16843776' value: '5'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16844032' value: '5'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16844288' value: '5'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16847360' value: '7'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16847616' value: '7'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16847872' value: '6'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16848128' value: '6'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850178' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850179' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850180' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850181' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850182' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850183' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850184' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850185' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850186' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850187' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850188' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850189' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850190' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850191' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850192' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850193' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850194' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850195' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850196' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850197' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850198' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850199' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850200' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850201' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850434' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850435' value: '10'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16908288' value: '5'
Total: 0.41, Delta: 0, Index found at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16908289' value: '9'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16777216' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16777216'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16842752' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16842752'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16842753' results: '16842753'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16843009' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16843009'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16843010' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16843010'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16843520' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16843520'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16843776' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16843776'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16844032' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16844032'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16844288' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16844288'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16847360' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16847360'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16847616' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16847616'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16847872' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16847872'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16848128' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16848128'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850178' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850178'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850179' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850179'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850180' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850180'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850181' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850181'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850182' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850182'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850183' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850183'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850184' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850184'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850185' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850185'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850186' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850186'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850187' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850187'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850188' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850188'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850189' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850189'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850190' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850190'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850191' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850191'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850192' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850192'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850193' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850193'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850194' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850194'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850195' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850195'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850196' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850196'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850197' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850197'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850198' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850198'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850199' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850199'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850200' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850200'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850201' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850201'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850434' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850434'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16850435' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16850435'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16908288' results: '.1.3.6.1.2.1.47.1.1.1.1.5.16908288'
Total: 0.41, Delta: 0, index_parse at OID: '.1.3.6.1.2.1.47.1.1.1.1.5.16908289' results: '16908289'
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16777216']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16842752']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='16842753']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16843009']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16843010']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16843520']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16843776']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16844032']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16844288']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16847360']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16847616']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16847872']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16848128']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850178']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850179']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850180']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850181']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850182']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850183']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850184']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850185']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850186']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850187']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850188']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850189']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850190']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850191']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850192']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850193']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850194']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850195']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850196']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850197']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850198']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850199']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850200']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850201']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850434']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16850435']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='.1.3.6.1.2.1.47.1.1.1.1.5.16908288']
Total: 0.41, Delta: 0, Inserting index data for field 'Index' [value='16908289']
@David-yanp
Copy link
Author

Maybe the php function preg_replace error?

@netniV
Copy link
Member

netniV commented Mar 7, 2018

Your regular expression is wrong.

You're using a lazy match with anything before it. Therefore, the regex will match more than you think, plus you are using character based matching as you go down the string which means that you will have more combinations than you expect. If you really need just those two OIDs, use them in a xxx|yyy fashion instead.

I suggest you use regex101.com to build the expression you desire, paste all the OIDs into the search box to see what matches.

The other thing that could be happening is that, if the regex isn't valid, it may be defaulting back to finding all items.

@David-yanp
Copy link
Author

Sorry,maybe I'm miss something.

I'm check with regex101.com when I post the issues.Now,I change the oid_index_parse to .*?\.(16842753|16908289)$ but the result is same.

regex001
regex002

@cigamit cigamit added the unverified Some days we don't have a clue label Mar 9, 2018
@cigamit
Copy link
Member

cigamit commented Mar 24, 2018

No feedback. Use a script if snmp won't work.

@cigamit cigamit closed this as completed Mar 24, 2018
@David-yanp
Copy link
Author

The function preg_match is ok,but preg_replace work error.

@netniV
Copy link
Member

netniV commented Mar 28, 2018

Can you elaborate?

@David-yanp
Copy link
Author

[root@ebs ~]# php71 -r "var_dump(preg_replace('/.*?\.(16[89][04][28][27][58][39])$/', '', '.1.3.6.1.2.1.47.1.1.1.1.5.16777216'));"
string(34) ".1.3.6.1.2.1.47.1.1.1.1.5.16777216"
[root@ebs ~]# php71 -r "var_dump(preg_match('/.*?\.(16[89][04][28][27][58][39])$/', '.1.3.6.1.2.1.47.1.1.1.1.5.16777216'));" 
int(0)

@netniV
Copy link
Member

netniV commented Mar 29, 2018

Actually, both are working as intended. The string does NOT match the OID passed so it fails the match when using BOTH preg_replace and preg_match. The difference is that preg_match is returning 0 meaning there were no matches.

However, preg_replace always returns a string with whatever matches are found against parameter one, with the replacement text of parameter 2. Thus, what preg_replace is returning is a completely UNCHANGED string as there was no match. If you change the OID to .1.3.6.1.2.1.47.1.1.1.1.5.16842753 you will find that part is stripped away and you should get back .1.3.6.1.2.1.47.1.1.1.1.5

@David-yanp
Copy link
Author

David-yanp commented Mar 30, 2018

As I tested preg_replace will retun not only matches.

Is that against the function of OID/REGEXP?

image

@netniV
Copy link
Member

netniV commented Mar 30, 2018

I've re-read the entire thread and I realised I missed the earlier mention that you only want the matching items as indexes. I think that would need to be an enhancement, but I'll see if I can spot were it is and whether there is already functionality for that.

netniV added a commit to netniV/cacti that referenced this issue Mar 30, 2018
… to those that match

When using oid_regexp_parse all indexes are returned, some with their OID's correctly replaced.  If an index does not match, it's index is kept as an OID.  This is now corrected to filter indexes to just those that match.
cigamit pushed a commit that referenced this issue Mar 30, 2018
…hose that match (#1509)

When using oid_regexp_parse all indexes are returned, some with their OID's correctly replaced.  If an index does not match, it's index is kept as an OID.  This is now corrected to filter indexes to just those that match.
@David-yanp
Copy link
Author

Now it's work

Thank you.

@netniV netniV changed the title OID/REGEXP does not work. When using oid_regexp_parse, filter indexes to those that match Jan 2, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
unverified Some days we don't have a clue
Projects
None yet
Development

No branches or pull requests

3 participants