<?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 Why does kvstore_to_json.py fail to update kpi threshold templates? in Splunk ITSI</title>
    <link>https://community.splunk.com/t5/Splunk-ITSI/Why-does-kvstore-to-json-py-fail-to-update-kpi-threshold/m-p/609637#M2553</link>
    <description>&lt;P&gt;when doing a partial backup (GUI)/restore (CLI),&lt;/P&gt;
&lt;P&gt;it fails with the message:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;process:17394 thread:MainThread ERROR [itsi.migration] [__init__:1413] [exception] Object names must be unique for object type: kpi_threshold_template. List of duplicate names: [omitted list of duplicate objects].
Traceback (most recent call last):
  File "/opt/splunk/etc/apps/SA-ITOA/lib/migration/migration.py", line 200, in migration_bulk_save_to_kvstore
    handler.migration_save_single_object_to_kvstore(object_type=object_type, validation=validation, dupname_tag=dupname_tag, skip_local_failure=skip_local_failure)
  File "/opt/splunk/etc/apps/SA-ITOA/lib/migration/object_interface/itoa_migration_interface.py", line 130, in migration_save_single_object_to_kvstore
    skip_local_failure=skip_local_failure)
  File "/opt/splunk/etc/apps/SA-ITOA/lib/ITOA/itoa_common.py", line 1026, in save_batch
    skip_local_failure=skip_local_failure)
  File "/opt/splunk/etc/apps/SA-ITOA/lib/ITOA/itoa_object.py", line 431, in save_batch
    transaction_id=transaction_id, skip_local_failure=skip_local_failure)
  File "/opt/splunk/etc/apps/SA-ITOA/lib/ITOA/itoa_object.py", line 169, in do_object_validation
    raise e
  File "/opt/splunk/etc/apps/SA-ITOA/lib/ITOA/itoa_object.py", line 164, in do_object_validation
    self.validate_identifying_name(owner, objects, dupname_tag, transaction_id)
  File "/opt/splunk/etc/apps/SA-ITOA/lib/ITOA/itoa_object.py", line 232, in validate_identifying_name
    409
  File "/opt/splunk/etc/apps/SA-ITOA/lib/ITOA/itoa_common.py", line 949, in raise_error_bad_validation
    raise ItoaValidationError(message, logger, self.log_prefix, status_code=status_code)
ITOA.itoa_exceptions.ItoaValidationError: Object names must be unique for object type: kpi_threshold_template. List of duplicate names: [omitted list of duplicate objects].&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried using the -e switch documented (I tried even if it only renames services/entities),&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/ITSI/4.4.5/Configure/kvstorejson" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/ITSI/4.4.5/Configure/kvstorejson&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;when removing the json file that has the KPI Threshold templates, the script successfully creates/updates all other objects.&lt;/P&gt;
&lt;P&gt;to be complete, this is the CLI call:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;/opt/splunk/bin/splunk cmd python /opt/splunk/etc/apps/SA-ITOA/bin/kvstore_to_json.py -i -d -n -f /home/&amp;lt;myuser&amp;gt;/depot/itsi/itsi_configurations/ -u admin -p &amp;lt;cut&amp;gt; -v -e dup_202208161350&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any pointers?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Aug 2022 13:20:58 GMT</pubDate>
    <dc:creator>wmuselle</dc:creator>
    <dc:date>2022-08-16T13:20:58Z</dc:date>
    <item>
      <title>Why does kvstore_to_json.py fail to update kpi threshold templates?</title>
      <link>https://community.splunk.com/t5/Splunk-ITSI/Why-does-kvstore-to-json-py-fail-to-update-kpi-threshold/m-p/609637#M2553</link>
      <description>&lt;P&gt;when doing a partial backup (GUI)/restore (CLI),&lt;/P&gt;
&lt;P&gt;it fails with the message:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;process:17394 thread:MainThread ERROR [itsi.migration] [__init__:1413] [exception] Object names must be unique for object type: kpi_threshold_template. List of duplicate names: [omitted list of duplicate objects].
Traceback (most recent call last):
  File "/opt/splunk/etc/apps/SA-ITOA/lib/migration/migration.py", line 200, in migration_bulk_save_to_kvstore
    handler.migration_save_single_object_to_kvstore(object_type=object_type, validation=validation, dupname_tag=dupname_tag, skip_local_failure=skip_local_failure)
  File "/opt/splunk/etc/apps/SA-ITOA/lib/migration/object_interface/itoa_migration_interface.py", line 130, in migration_save_single_object_to_kvstore
    skip_local_failure=skip_local_failure)
  File "/opt/splunk/etc/apps/SA-ITOA/lib/ITOA/itoa_common.py", line 1026, in save_batch
    skip_local_failure=skip_local_failure)
  File "/opt/splunk/etc/apps/SA-ITOA/lib/ITOA/itoa_object.py", line 431, in save_batch
    transaction_id=transaction_id, skip_local_failure=skip_local_failure)
  File "/opt/splunk/etc/apps/SA-ITOA/lib/ITOA/itoa_object.py", line 169, in do_object_validation
    raise e
  File "/opt/splunk/etc/apps/SA-ITOA/lib/ITOA/itoa_object.py", line 164, in do_object_validation
    self.validate_identifying_name(owner, objects, dupname_tag, transaction_id)
  File "/opt/splunk/etc/apps/SA-ITOA/lib/ITOA/itoa_object.py", line 232, in validate_identifying_name
    409
  File "/opt/splunk/etc/apps/SA-ITOA/lib/ITOA/itoa_common.py", line 949, in raise_error_bad_validation
    raise ItoaValidationError(message, logger, self.log_prefix, status_code=status_code)
ITOA.itoa_exceptions.ItoaValidationError: Object names must be unique for object type: kpi_threshold_template. List of duplicate names: [omitted list of duplicate objects].&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried using the -e switch documented (I tried even if it only renames services/entities),&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/ITSI/4.4.5/Configure/kvstorejson" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/ITSI/4.4.5/Configure/kvstorejson&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;when removing the json file that has the KPI Threshold templates, the script successfully creates/updates all other objects.&lt;/P&gt;
&lt;P&gt;to be complete, this is the CLI call:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;/opt/splunk/bin/splunk cmd python /opt/splunk/etc/apps/SA-ITOA/bin/kvstore_to_json.py -i -d -n -f /home/&amp;lt;myuser&amp;gt;/depot/itsi/itsi_configurations/ -u admin -p &amp;lt;cut&amp;gt; -v -e dup_202208161350&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any pointers?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 13:20:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-ITSI/Why-does-kvstore-to-json-py-fail-to-update-kpi-threshold/m-p/609637#M2553</guid>
      <dc:creator>wmuselle</dc:creator>
      <dc:date>2022-08-16T13:20:58Z</dc:date>
    </item>
  </channel>
</rss>

