<?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 Re: Ensuring that no duplicate events will be indexed in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Ensuring-that-no-duplicate-events-will-be-indexed/m-p/53574#M10342</link>
    <description>&lt;P&gt;Splunk MD5 on the file, but does not check events or line in the file for duplicates. If it’s added to your file splunk assumes you wanted it.  You will have to build a more Robust script. I’ve had similar issues with data.  My approach was to have the script query and create new few if it does exist.  If the file does exist have script query and store each event/line in a list or array.  Then read existing each event/line from file into a hash or dictionary, if exist remove or pop element.  Final array should only contain new events and just append output to existing file.  Below is some basic logic.&lt;/P&gt;

&lt;P&gt;Logic:&lt;BR /&gt;
&lt;UL&gt;&lt;BR /&gt;
&lt;LI&gt;-Query data and store in array&lt;/LI&gt;&lt;BR /&gt;
&lt;LI&gt;-Does output file exist (yes/no)&lt;/LI&gt;&lt;BR /&gt;
&lt;UL&gt;&lt;BR /&gt;
  &lt;LI&gt;NO:  create file. And output data. Exit&lt;/LI&gt;&lt;BR /&gt;
  &lt;LI&gt;Yes: Read file and store in Hash.&lt;/LI&gt;&lt;BR /&gt;
&lt;/UL&gt;&lt;BR /&gt;
&lt;LI&gt;Iterate through data in array. Does element exist in Hash (yes/no)&lt;/LI&gt;&lt;BR /&gt;
&lt;UL&gt;&lt;BR /&gt;
&lt;LI&gt;Yes: Remove element from array. &lt;/LI&gt;&lt;BR /&gt;
&lt;LI&gt;No:  Next element.&lt;/LI&gt;&lt;BR /&gt;
&lt;/UL&gt;&lt;BR /&gt;
# Note: at this point only new data is in array.  Assuming data in array is already sorted.&lt;BR /&gt;
&lt;LI&gt;Append data to existing output file. &lt;/LI&gt;&lt;BR /&gt;
&lt;LI&gt;Exit&lt;/LI&gt;&lt;BR /&gt;
&lt;/UL&gt;&lt;/P&gt;

&lt;P&gt;This one was one of my first python programs so its not the prettist code.&lt;BR /&gt;
UPDATE SAMPLE:&lt;BR /&gt;
&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
import sys&lt;BR /&gt;
# ############################&lt;BR /&gt;
# User defined variables&lt;BR /&gt;
# ############################&lt;BR /&gt;
isdebug = 0 &lt;BR /&gt;
loc = ''&lt;BR /&gt;
locations = ['PERF','DEV'] #Option 'DEV' 'PROD' 'PERF'&lt;BR /&gt;
username = ""  #F5 user&lt;BR /&gt;
password = ""  #f% user password&lt;BR /&gt;
#datadrop = 'E:/Data/perfdata/'+loc+'/f5/'&lt;BR /&gt;
# additional graphobjs and discriptions can be found in readme file.  Use graph_name column for graphobjs list&lt;BR /&gt;
graphobjs = [ &lt;BR /&gt;
            'CPU',&lt;BR /&gt;
            'memory',&lt;BR /&gt;
            'throughput',&lt;BR /&gt;
            'detailthroughput1',&lt;BR /&gt;
            'detailthroughput2',&lt;BR /&gt;
            'detailactcons1',&lt;BR /&gt;
            'detailnewcons4',&lt;BR /&gt;
            'httprequests',&lt;BR /&gt;
            'SSLTPSGraph',&lt;BR /&gt;
            'detailnewcons3',&lt;BR /&gt;
            'detailactcons3'&lt;BR /&gt;
            ] &lt;BR /&gt;
# ############################&lt;BR /&gt;
# Custome function&lt;BR /&gt;
# ############################&lt;BR /&gt;
# ############################&lt;BR /&gt;
# Debug&lt;BR /&gt;
# ############################&lt;BR /&gt;
def debug (strvalue, bolvalue):&lt;BR /&gt;
    if bolvalue:&lt;BR /&gt;
        print(strvalue)&lt;BR /&gt;
        print&lt;BR /&gt;
# ############################&lt;BR /&gt;
# Pull f5 performance csv stats&lt;BR /&gt;
# ############################&lt;BR /&gt;
def f5csvstats(objname,fileloc,location):&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    # Additional modules&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    import get_interface as F5, os, re, time, binascii&lt;BR /&gt;
    from time import localtime, strftime&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    # Date and time stamps&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    localdate = strftime("%Y-%m%d", localtime())&lt;BR /&gt;
    timestamp = strftime("%Y-%m-%d\t%H:%M\t",localtime())&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    # File names&lt;BR /&gt;
    # ############################ &lt;BR /&gt;
    f5perfdata = fileloc + 'f5' +objname + '_' + localdate +'.tsv'&lt;BR /&gt;
    f5error =  fileloc + 'error'&lt;BR /&gt;
    outputdef = fileloc + 'readme.txt'&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    # Creating F5 object/interface&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    interface = F5.f5_interface(location, username, password)&lt;BR /&gt;
    if not interface:&lt;BR /&gt;
        debug(interface, isdebug)&lt;BR /&gt;
        errfile = open(f5error, 'w')&lt;BR /&gt;
        errfile.write('statheader and statvalue did not match, output not written to perfstats file.\n')&lt;BR /&gt;
        errofile.close()&lt;BR /&gt;
        sys.exit(51)&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    # Pulling binary data for get_performance_graph_csv_statistics api object&lt;BR /&gt;
    # ############################&lt;BR /&gt;
csv = interface.System.Statistics.get_performance_graph_csv_statistics(objects = [{'object_name': objname, 'start_time': 0, 'end_time': 0, 'interval': 0, 'maximum_rows': 0}])&lt;BR /&gt;
    stat = binascii.a2b_base64(csv[0].statistic_data)&lt;BR /&gt;
    statline = []&lt;BR /&gt;
    statline = stat.split('\n')&lt;BR /&gt;
    header = 'date\ttime\t'&lt;BR /&gt;
    for head in statline[0].split(',')[1:]:&lt;BR /&gt;
        header += head.strip('\"') + '\t'&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    # Creating tsv file, sorting, and adding unique data&lt;BR /&gt;
    # ############################&lt;BR /&gt;
d = {}&lt;BR /&gt;
    ftout = ''&lt;BR /&gt;
    if(os.path.exists(f5perfdata)):&lt;BR /&gt;
        statfile = open(f5perfdata, 'r')&lt;BR /&gt;
        timestamp = float(statfile.readlines()[-1].split('\t')[-1])&lt;BR /&gt;
        statfile.close()&lt;BR /&gt;
        statline.pop()&lt;BR /&gt;
        for x in statline[1:-1]:&lt;BR /&gt;
            element =  x.split(',')&lt;BR /&gt;
            if len(element) &amp;gt; 1 and float(element[0]) &amp;gt; timestamp and not '             nan' in element:&lt;BR /&gt;
                ftout += strftime("\n%Y-%m-%d\t%H:%M", localtime(float(element[0]))) + '\t'&lt;BR /&gt;
                for ele in element[1:]:&lt;BR /&gt;
                    ftout += ele+ '\t'&lt;BR /&gt;
                ftout += element[0].strip('\n')&lt;BR /&gt;
        statfile = open(f5perfdata, 'a')&lt;BR /&gt;
        statfile.write(ftout)&lt;BR /&gt;
        statfile.close()&lt;BR /&gt;
    else:&lt;BR /&gt;
        ftout = header + 'epoch'&lt;BR /&gt;
        for x in statline[1:]:&lt;BR /&gt;
            element =  x.split(',')&lt;BR /&gt;
            if len(element) &amp;gt; 1 and not 'timestamp' in element[0]:&lt;BR /&gt;
                if  strftime("%Y%m%d",localtime()) == strftime("%Y%m%d", localtime(float(element[0]))):&lt;BR /&gt;
                    ftout += strftime("\n%Y-%m-%d\t%H:%M", localtime(float(element[0]))) + '\t'&lt;BR /&gt;
                    for ele in element[1:]:&lt;BR /&gt;
                        ftout += ele+ '\t'&lt;BR /&gt;
                    ftout += element[0] &lt;BR /&gt;
        statfile = open(f5perfdata, 'w')&lt;BR /&gt;
        statfile.write(ftout)&lt;BR /&gt;
        statfile.close()&lt;BR /&gt;
    if not (os.path.exists(outputdef)):&lt;BR /&gt;
        readtxt = "Below are additain objects that can be used to generate data.\n\ngraph_name                              graph_title                             graph_description\n----------                              -----------                             -----------------\nmemory                                  Memory Used                             Memory Used\nactivecons                              Active Connections                      Active Connections\nnewcons                                 New Connections                         New Connections\nthroughput                              Throughput                              Throughput\nhttprequests                            HTTP Requests                           HTTP Requests\nramcache                                RAM Cache Utilization                   RAM Cache Utilization\ndetailactcons1                          Active Connections                      Active Connections\ndetailactcons2                          Active PVA Connections                  Active PVA Connections\ndetailactcons3                          Active SSL Connections                  Active SSL Connections\ndetailnewcons1                          Total New Connections                   Total New Connections\ndetailnewcons2                          New PVA Connections                     New PVA Connections\ndetailnewcons3                          New ClientSSL Profile Connections       New ClientSSL Profile Connections\ndetailnewcons4                          New Accepts/Connects                    New Accepts/Connects\ndetailthroughput1                       Client-side Throughput                  Client-side Throughput\ndetailthroughput2                       Server-side Throughput                  Server-side Throughput\ndetailthroughput3                       HTTP Compression Rate                   HTTP Compression Rate\nSSLTPSGraph                             SSL Transactions/Sec                    SSL Transactions/Sec\nGTMGraph                                GTM Performance                         GTM Requests and Resolutions\nGTMrequests                             GTM Requests                            GTM Requests\nGTMresolutions                          GTM Resolutions                         GTM Resolutions\nGTMpersisted                            GTM Resolutions Persisted               GTM Resolutions Persisted\nGTMret2dns                              GTM Resolutions Returned to DNS         GTM Resolutions Returned to DNS\ndetailcpu0                              CPU Utilization                         CPU Usage\ndetailcpu1                              CPU Utilization                         CPU Usage\nCPU                                     CPU Utilization                         CPU Usage\ndetailtmm0                              TMM Utilization                         TMM Usage\nTMM                                     TMM Utilization                         TMM CPU Utilization"&lt;BR /&gt;
        readme = open(outputdef, 'w')&lt;BR /&gt;
        readme.write(readtxt)&lt;BR /&gt;
        readme.close()&lt;BR /&gt;
# ############################&lt;BR /&gt;
# Main Body&lt;BR /&gt;
# ############################&lt;BR /&gt;
for loc in locations:&lt;BR /&gt;
    for x in graphobjs:&lt;BR /&gt;
        debug(x, isdebug)&lt;BR /&gt;
        f5csvstats(x,'E:/Data/perfdata/'+loc+'/f5/', loc)&lt;BR /&gt;
sys.exit(0)&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;
Hope this helps or gets you started.  If this does help please Vote up and/or accept it.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 13:28:59 GMT</pubDate>
    <dc:creator>bmacias84</dc:creator>
    <dc:date>2020-09-28T13:28:59Z</dc:date>
    <item>
      <title>Ensuring that no duplicate events will be indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ensuring-that-no-duplicate-events-will-be-indexed/m-p/53573#M10341</link>
      <description>&lt;P&gt;Hi guys, I'm stumped on task I've been working on for the last few weeks.  We are extracting about 1.5 million lines of events from Nessus vulnerability info into a file and then having splunk index via a monitor. &lt;/P&gt;

&lt;P&gt;From there we are going to do some logic within our query script to make sure we only pull the latest events from nessus since the last query and have splunk index those new events.  &lt;/P&gt;

&lt;P&gt;Something we have been discussing internally is what occurs if something blows up on the script and we end up indexing data twice. How do we guarantee that in the event that something goes wrong with our query script we wouldn't re-index data twice?&lt;/P&gt;

&lt;P&gt;There have been thoughts of tagging a MD5 sum to the events prior to indexing, then using a call to the Splunk API to match what is on the index vs what we have locally prior to creating a new file to index.  Is this even possible and how have others in the same boat approached?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2013 21:34:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ensuring-that-no-duplicate-events-will-be-indexed/m-p/53573#M10341</guid>
      <dc:creator>dondky</dc:creator>
      <dc:date>2013-03-06T21:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Ensuring that no duplicate events will be indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ensuring-that-no-duplicate-events-will-be-indexed/m-p/53574#M10342</link>
      <description>&lt;P&gt;Splunk MD5 on the file, but does not check events or line in the file for duplicates. If it’s added to your file splunk assumes you wanted it.  You will have to build a more Robust script. I’ve had similar issues with data.  My approach was to have the script query and create new few if it does exist.  If the file does exist have script query and store each event/line in a list or array.  Then read existing each event/line from file into a hash or dictionary, if exist remove or pop element.  Final array should only contain new events and just append output to existing file.  Below is some basic logic.&lt;/P&gt;

&lt;P&gt;Logic:&lt;BR /&gt;
&lt;UL&gt;&lt;BR /&gt;
&lt;LI&gt;-Query data and store in array&lt;/LI&gt;&lt;BR /&gt;
&lt;LI&gt;-Does output file exist (yes/no)&lt;/LI&gt;&lt;BR /&gt;
&lt;UL&gt;&lt;BR /&gt;
  &lt;LI&gt;NO:  create file. And output data. Exit&lt;/LI&gt;&lt;BR /&gt;
  &lt;LI&gt;Yes: Read file and store in Hash.&lt;/LI&gt;&lt;BR /&gt;
&lt;/UL&gt;&lt;BR /&gt;
&lt;LI&gt;Iterate through data in array. Does element exist in Hash (yes/no)&lt;/LI&gt;&lt;BR /&gt;
&lt;UL&gt;&lt;BR /&gt;
&lt;LI&gt;Yes: Remove element from array. &lt;/LI&gt;&lt;BR /&gt;
&lt;LI&gt;No:  Next element.&lt;/LI&gt;&lt;BR /&gt;
&lt;/UL&gt;&lt;BR /&gt;
# Note: at this point only new data is in array.  Assuming data in array is already sorted.&lt;BR /&gt;
&lt;LI&gt;Append data to existing output file. &lt;/LI&gt;&lt;BR /&gt;
&lt;LI&gt;Exit&lt;/LI&gt;&lt;BR /&gt;
&lt;/UL&gt;&lt;/P&gt;

&lt;P&gt;This one was one of my first python programs so its not the prettist code.&lt;BR /&gt;
UPDATE SAMPLE:&lt;BR /&gt;
&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
import sys&lt;BR /&gt;
# ############################&lt;BR /&gt;
# User defined variables&lt;BR /&gt;
# ############################&lt;BR /&gt;
isdebug = 0 &lt;BR /&gt;
loc = ''&lt;BR /&gt;
locations = ['PERF','DEV'] #Option 'DEV' 'PROD' 'PERF'&lt;BR /&gt;
username = ""  #F5 user&lt;BR /&gt;
password = ""  #f% user password&lt;BR /&gt;
#datadrop = 'E:/Data/perfdata/'+loc+'/f5/'&lt;BR /&gt;
# additional graphobjs and discriptions can be found in readme file.  Use graph_name column for graphobjs list&lt;BR /&gt;
graphobjs = [ &lt;BR /&gt;
            'CPU',&lt;BR /&gt;
            'memory',&lt;BR /&gt;
            'throughput',&lt;BR /&gt;
            'detailthroughput1',&lt;BR /&gt;
            'detailthroughput2',&lt;BR /&gt;
            'detailactcons1',&lt;BR /&gt;
            'detailnewcons4',&lt;BR /&gt;
            'httprequests',&lt;BR /&gt;
            'SSLTPSGraph',&lt;BR /&gt;
            'detailnewcons3',&lt;BR /&gt;
            'detailactcons3'&lt;BR /&gt;
            ] &lt;BR /&gt;
# ############################&lt;BR /&gt;
# Custome function&lt;BR /&gt;
# ############################&lt;BR /&gt;
# ############################&lt;BR /&gt;
# Debug&lt;BR /&gt;
# ############################&lt;BR /&gt;
def debug (strvalue, bolvalue):&lt;BR /&gt;
    if bolvalue:&lt;BR /&gt;
        print(strvalue)&lt;BR /&gt;
        print&lt;BR /&gt;
# ############################&lt;BR /&gt;
# Pull f5 performance csv stats&lt;BR /&gt;
# ############################&lt;BR /&gt;
def f5csvstats(objname,fileloc,location):&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    # Additional modules&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    import get_interface as F5, os, re, time, binascii&lt;BR /&gt;
    from time import localtime, strftime&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    # Date and time stamps&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    localdate = strftime("%Y-%m%d", localtime())&lt;BR /&gt;
    timestamp = strftime("%Y-%m-%d\t%H:%M\t",localtime())&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    # File names&lt;BR /&gt;
    # ############################ &lt;BR /&gt;
    f5perfdata = fileloc + 'f5' +objname + '_' + localdate +'.tsv'&lt;BR /&gt;
    f5error =  fileloc + 'error'&lt;BR /&gt;
    outputdef = fileloc + 'readme.txt'&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    # Creating F5 object/interface&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    interface = F5.f5_interface(location, username, password)&lt;BR /&gt;
    if not interface:&lt;BR /&gt;
        debug(interface, isdebug)&lt;BR /&gt;
        errfile = open(f5error, 'w')&lt;BR /&gt;
        errfile.write('statheader and statvalue did not match, output not written to perfstats file.\n')&lt;BR /&gt;
        errofile.close()&lt;BR /&gt;
        sys.exit(51)&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    # Pulling binary data for get_performance_graph_csv_statistics api object&lt;BR /&gt;
    # ############################&lt;BR /&gt;
csv = interface.System.Statistics.get_performance_graph_csv_statistics(objects = [{'object_name': objname, 'start_time': 0, 'end_time': 0, 'interval': 0, 'maximum_rows': 0}])&lt;BR /&gt;
    stat = binascii.a2b_base64(csv[0].statistic_data)&lt;BR /&gt;
    statline = []&lt;BR /&gt;
    statline = stat.split('\n')&lt;BR /&gt;
    header = 'date\ttime\t'&lt;BR /&gt;
    for head in statline[0].split(',')[1:]:&lt;BR /&gt;
        header += head.strip('\"') + '\t'&lt;BR /&gt;
    # ############################&lt;BR /&gt;
    # Creating tsv file, sorting, and adding unique data&lt;BR /&gt;
    # ############################&lt;BR /&gt;
d = {}&lt;BR /&gt;
    ftout = ''&lt;BR /&gt;
    if(os.path.exists(f5perfdata)):&lt;BR /&gt;
        statfile = open(f5perfdata, 'r')&lt;BR /&gt;
        timestamp = float(statfile.readlines()[-1].split('\t')[-1])&lt;BR /&gt;
        statfile.close()&lt;BR /&gt;
        statline.pop()&lt;BR /&gt;
        for x in statline[1:-1]:&lt;BR /&gt;
            element =  x.split(',')&lt;BR /&gt;
            if len(element) &amp;gt; 1 and float(element[0]) &amp;gt; timestamp and not '             nan' in element:&lt;BR /&gt;
                ftout += strftime("\n%Y-%m-%d\t%H:%M", localtime(float(element[0]))) + '\t'&lt;BR /&gt;
                for ele in element[1:]:&lt;BR /&gt;
                    ftout += ele+ '\t'&lt;BR /&gt;
                ftout += element[0].strip('\n')&lt;BR /&gt;
        statfile = open(f5perfdata, 'a')&lt;BR /&gt;
        statfile.write(ftout)&lt;BR /&gt;
        statfile.close()&lt;BR /&gt;
    else:&lt;BR /&gt;
        ftout = header + 'epoch'&lt;BR /&gt;
        for x in statline[1:]:&lt;BR /&gt;
            element =  x.split(',')&lt;BR /&gt;
            if len(element) &amp;gt; 1 and not 'timestamp' in element[0]:&lt;BR /&gt;
                if  strftime("%Y%m%d",localtime()) == strftime("%Y%m%d", localtime(float(element[0]))):&lt;BR /&gt;
                    ftout += strftime("\n%Y-%m-%d\t%H:%M", localtime(float(element[0]))) + '\t'&lt;BR /&gt;
                    for ele in element[1:]:&lt;BR /&gt;
                        ftout += ele+ '\t'&lt;BR /&gt;
                    ftout += element[0] &lt;BR /&gt;
        statfile = open(f5perfdata, 'w')&lt;BR /&gt;
        statfile.write(ftout)&lt;BR /&gt;
        statfile.close()&lt;BR /&gt;
    if not (os.path.exists(outputdef)):&lt;BR /&gt;
        readtxt = "Below are additain objects that can be used to generate data.\n\ngraph_name                              graph_title                             graph_description\n----------                              -----------                             -----------------\nmemory                                  Memory Used                             Memory Used\nactivecons                              Active Connections                      Active Connections\nnewcons                                 New Connections                         New Connections\nthroughput                              Throughput                              Throughput\nhttprequests                            HTTP Requests                           HTTP Requests\nramcache                                RAM Cache Utilization                   RAM Cache Utilization\ndetailactcons1                          Active Connections                      Active Connections\ndetailactcons2                          Active PVA Connections                  Active PVA Connections\ndetailactcons3                          Active SSL Connections                  Active SSL Connections\ndetailnewcons1                          Total New Connections                   Total New Connections\ndetailnewcons2                          New PVA Connections                     New PVA Connections\ndetailnewcons3                          New ClientSSL Profile Connections       New ClientSSL Profile Connections\ndetailnewcons4                          New Accepts/Connects                    New Accepts/Connects\ndetailthroughput1                       Client-side Throughput                  Client-side Throughput\ndetailthroughput2                       Server-side Throughput                  Server-side Throughput\ndetailthroughput3                       HTTP Compression Rate                   HTTP Compression Rate\nSSLTPSGraph                             SSL Transactions/Sec                    SSL Transactions/Sec\nGTMGraph                                GTM Performance                         GTM Requests and Resolutions\nGTMrequests                             GTM Requests                            GTM Requests\nGTMresolutions                          GTM Resolutions                         GTM Resolutions\nGTMpersisted                            GTM Resolutions Persisted               GTM Resolutions Persisted\nGTMret2dns                              GTM Resolutions Returned to DNS         GTM Resolutions Returned to DNS\ndetailcpu0                              CPU Utilization                         CPU Usage\ndetailcpu1                              CPU Utilization                         CPU Usage\nCPU                                     CPU Utilization                         CPU Usage\ndetailtmm0                              TMM Utilization                         TMM Usage\nTMM                                     TMM Utilization                         TMM CPU Utilization"&lt;BR /&gt;
        readme = open(outputdef, 'w')&lt;BR /&gt;
        readme.write(readtxt)&lt;BR /&gt;
        readme.close()&lt;BR /&gt;
# ############################&lt;BR /&gt;
# Main Body&lt;BR /&gt;
# ############################&lt;BR /&gt;
for loc in locations:&lt;BR /&gt;
    for x in graphobjs:&lt;BR /&gt;
        debug(x, isdebug)&lt;BR /&gt;
        f5csvstats(x,'E:/Data/perfdata/'+loc+'/f5/', loc)&lt;BR /&gt;
sys.exit(0)&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;
Hope this helps or gets you started.  If this does help please Vote up and/or accept it.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:28:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ensuring-that-no-duplicate-events-will-be-indexed/m-p/53574#M10342</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2020-09-28T13:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Ensuring that no duplicate events will be indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ensuring-that-no-duplicate-events-will-be-indexed/m-p/53575#M10343</link>
      <description>&lt;P&gt;Thanks for the reply, would you happen to have some sample code you can provide on the process?  The goal would not to re-engineer the wheel and work with one others have done.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2013 14:36:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ensuring-that-no-duplicate-events-will-be-indexed/m-p/53575#M10343</guid>
      <dc:creator>dondky</dc:creator>
      <dc:date>2013-03-11T14:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Ensuring that no duplicate events will be indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ensuring-that-no-duplicate-events-will-be-indexed/m-p/53576#M10344</link>
      <description>&lt;P&gt;@dondky, I don't know how helpfull it will be since it data specific and uses a custom imported module,but sure.  This is for an F5 Loadbalancer pulling csv stats.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2013 15:05:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ensuring-that-no-duplicate-events-will-be-indexed/m-p/53576#M10344</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2013-03-11T15:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Ensuring that no duplicate events will be indexed</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ensuring-that-no-duplicate-events-will-be-indexed/m-p/53577#M10345</link>
      <description>&lt;P&gt;That script there only looks for data with new time stamps that previously entered in data file.  I chose to use the time stamp over the hash method becuase my datafile was getting to large to store in memory and became very slow. The has and dictionary portion are really easy to do.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2013 18:32:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ensuring-that-no-duplicate-events-will-be-indexed/m-p/53577#M10345</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2013-03-11T18:32:07Z</dc:date>
    </item>
  </channel>
</rss>

