<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to get counter values in a metrics Index? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-counter-values-in-a-metrics-Index/m-p/470399#M80876</link>
    <description>&lt;P&gt;Hi Splunkers,&lt;/P&gt;

&lt;P&gt;I am currently working on collecting my SNMP network performance data on Splunk 7.3.3. As SNMP polling  tool I use CA Spectrum and its component SSLOGGER.&lt;/P&gt;

&lt;P&gt;I prepare the data with some scripts to get the following output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1577660589,router1,router1_fastethernet1-1-2.3000,0,Interface.ifHCInOctets,1826425060,CiscoASR1013,Router,Region:City:Street_No,1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In Splunk I read the file as usual, assign it to a Metrics Index and use a transforms to set the META fields and dimensions relevant for Metrics Store:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[SPECTRUM_SSLOGGER_FORMAT_METRICS]
REGEX = ^[^,]+,([^,]+),([^,]*),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+)
FORMAT = ModelName::$2 Instance::$3 metric_name::$4 _value::$5  SwitchType::$6 DeviceClass::$7 SpectrumTopology::$8 BU::$9
WRITE_META = true

host=router1
ModelName=router1_fastethernet1-1-2.3000
Instance=0
metric_name=Interface.ifHCInOctets
_value=1826425060
SwitchType=CiscoASR1013
DeviceClass=Router
SpectrumTopology=Region:City:Street_No
BU=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works fine so far, except that Splunk reads the _value as GAUGE (this is default type) and unfortunately I couldn't find a way to tell him that it is a COUNTER value. In the manual I can only find for a solution for StatsD, to handle GAUGE and COUNTER values by |g and |c, but unfortunately I can't find out how to do this with a CSV input.&lt;/P&gt;

&lt;P&gt;Can anyone help me?&lt;/P&gt;</description>
    <pubDate>Sun, 29 Dec 2019 23:43:04 GMT</pubDate>
    <dc:creator>oliverpaetzold</dc:creator>
    <dc:date>2019-12-29T23:43:04Z</dc:date>
    <item>
      <title>How to get counter values in a metrics Index?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-counter-values-in-a-metrics-Index/m-p/470399#M80876</link>
      <description>&lt;P&gt;Hi Splunkers,&lt;/P&gt;

&lt;P&gt;I am currently working on collecting my SNMP network performance data on Splunk 7.3.3. As SNMP polling  tool I use CA Spectrum and its component SSLOGGER.&lt;/P&gt;

&lt;P&gt;I prepare the data with some scripts to get the following output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1577660589,router1,router1_fastethernet1-1-2.3000,0,Interface.ifHCInOctets,1826425060,CiscoASR1013,Router,Region:City:Street_No,1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In Splunk I read the file as usual, assign it to a Metrics Index and use a transforms to set the META fields and dimensions relevant for Metrics Store:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[SPECTRUM_SSLOGGER_FORMAT_METRICS]
REGEX = ^[^,]+,([^,]+),([^,]*),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+)
FORMAT = ModelName::$2 Instance::$3 metric_name::$4 _value::$5  SwitchType::$6 DeviceClass::$7 SpectrumTopology::$8 BU::$9
WRITE_META = true

host=router1
ModelName=router1_fastethernet1-1-2.3000
Instance=0
metric_name=Interface.ifHCInOctets
_value=1826425060
SwitchType=CiscoASR1013
DeviceClass=Router
SpectrumTopology=Region:City:Street_No
BU=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works fine so far, except that Splunk reads the _value as GAUGE (this is default type) and unfortunately I couldn't find a way to tell him that it is a COUNTER value. In the manual I can only find for a solution for StatsD, to handle GAUGE and COUNTER values by |g and |c, but unfortunately I can't find out how to do this with a CSV input.&lt;/P&gt;

&lt;P&gt;Can anyone help me?&lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2019 23:43:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-counter-values-in-a-metrics-Index/m-p/470399#M80876</guid>
      <dc:creator>oliverpaetzold</dc:creator>
      <dc:date>2019-12-29T23:43:04Z</dc:date>
    </item>
  </channel>
</rss>

