Hi All,
I am running ELK stack 7.6.2. I need to parse a csv through Logstash. My logstash conf file looks like this:
input {
file {
path => "/opt/gtal/ictal/elasticsearch/app/logstash/stage/STATS-01062021.txt"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
separator => ","
skip_header => "true"
columns => ["Total call statistics for each process","User call statistics for each process"]
}
}
output {
file {
path => "/opt/gtal/ictal/elasticsearch/logs/maa/rubydebug.txt"
codec => rubydebug
}
elasticsearch {
hosts => [ "xx.xx.xx.xxx:3045" ]
user => "xxxxxxxxxx"
password => "xxxxxxxxxxxxxx"
index => "demo-csv-%{+YYYY.MM.dd}"
}
}
While I am able to display the result in Kibana, the data is spread all over. The CSV file is also complicated. Please see below:
Total call statistics for each process:
{'BServer': 3105489,
'CServer': 10146,
'CMngr': 5679760,
'CiCServer-19000101:19951231': 0,
'CiCServer-20191001:20191231': 34,
'CiCServer-20200101:20200331': 114134,
'CiCServer-20200401:20200630': 4967513,
'CiCServer-20200701:20200930': 4968153,
'CiCServer-20201001:20201231': 5057632,
'CiCServer-20210101:20210331': 5158988,
'CiCServer-20210401:20210630': 5351872,
'CiCServer-20210701:20210930': 0,
'CiCServer-20211001:20211231': 0,
'CfgServer': 52,
'CRskhist': 3548,
'gccdServer': 6,
'gfnServer': 1328904,
'kServer': 14363,
'madServer': 11045554,
'mmcServer': 6,
'qsServer': 6,
'RrServer': 681,
'StnServer': 194801}
User call statistics for each process:
{'BServer': {'': 7.0,
'ccvma': 153766.0,
'ccvrts': 2951576.0,
'fqenv': 3.0,
'frtbU': 137.0},
'CServer': {'': 3.0, 'ccvma': 10140.0, 'fqenv': 3.0},
'CMngr': {'': 182.0,
'ccvma': 190594.0,
'ccvrts': 5488978.0,
'fqenv': 6.0},
'CiCServer-19000101:19951231': {},
'CiCServer-19960101:20001231': {},
'CiCServer-20010101:20011231': {},
'CiCServer-20190101:20190331': {'': 9.0, 'ccvma': 9.0},
'CiCServer-20190401:20190630': {'': 16.0, 'ccvma': 18.0},
'CiCServer-20190701:20190930': {'': 16.0, 'ccvma': 18.0},
'CiCServer-20191001:20191231': {'': 16.0, 'ccvma': 18.0},
'CiCServer-20200101:20200331': {'': 16.0,
'ccvma': 1768.0,
'ccvrts': 112350.0},
'CiCServer-20200401:20200630': {'': 11.0,
'ccvma': 45092.0,
'ccvrts': 4922410.0},
'CiCServer-20200701:20200930': {'': 11.0,
'ccvma': 45645.0,
'ccvrts': 4922497.0},
'CiCServer-20201001:20201231': {'': 16.0,
'ccvma': 4074128.0,
'ccvrts': 983488.0},
'CiCServer-20210101:20210331': {'': 16.0,
'ccvma': 4824540.0,
'ccvrts': 334432.0},
'CiCServer-20210401:20210630': {'': 7341.0,
'ccvma': 4683996.0,
'ccvrts': 660535.0},
'CiCServer-20210701:20210930': {},
'CiCServer-20211001:20211231': {},
'CfgServer': {'': 6.0, 'ccvrts': 40.0, 'fqenv': 6.0},
'CRskhist': {'': 3.0, 'ccvma': 3542.0, 'fqenv': 3.0},
'gccdServer': {'': 3.0, 'fqenv': 3.0},
'gfnServer': {'': 433.0,
'ccvrts': 1328038.0,
'fqenv': 3.0,
'nameservice': 430.0},
'kServer': {'': 3.0, 'ccvrts': 14357.0, 'fqenv': 3.0},
'madServer': {'': 162.0,
'ccvma': 358873.0,
'ccvrts': 10686372.0,
'fqenv': 9.0,
'frtbU': 138.0},
'mmcServer': {'': 3.0, 'fqenv': 3.0},
'qsServer': {'': 3.0, 'fqenv': 3.0},
'RrServer': {'': 3.0, 'ccvma': 675.0, 'fqenv': 3.0},
'StnServer': {'': 3.0, 'ccvrts': 194795.0, 'fqenv': 3.0}}
Please guide me as I am new to this. thanks