splunk / splunk/splunkconf-backup

Join=left doesn't find Kvstore/Kvdump result when BACKUPKV is disabled

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
14
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Hi,

I 'm not sure if its an issue because i don't know the impact of this modification below.

My environment : Cluster Manager in v9.3.X splunk

  • Kvstore exists and enabled
  • The variable 'BACKUPKV' is disabled (0)

Result in 'splunkconf-backup' when the backup occur :

Image

Backup KV local is missing.

I found your SPL search with a 'join=left' :

|makeresults | eval host="XXXX(HIDE)XXXX" | makemv delim="|" host| eval object=mvappend("etc","scripts","kvdump","kvstore","state"), type=mvappend("local","remote") | mvexpand host| mvexpand object | mvexpand type | join type=left host,type,object [search index=_internal source="splunkconf-backup.log" "splunkconf-backup" NOT "splunkconf-purgebackup" action=backup NOT result="running" | bin _time span=1d | stats count as nb,latest(_raw) , latest(result) as result , values(result) as list_result by type,host,object]

Image

The request doesn't find any log about kvdump or kvstore, but they exist in the '_internal' index.
However, when i change the join to 'inner' :

|makeresults | eval host="XXXX(HIDE)XXXX" | makemv delim="|" host| eval object=mvappend("etc","scripts","kvdump","kvstore","state"), type=mvappend("local","remote") | mvexpand host| mvexpand object | mvexpand type | join type=inner host,type,object [search index=_internal source="splunkconf-backup.log" "splunkconf-backup" NOT "splunkconf-purgebackup" action=backup NOT result="running" | bin _time span=1d | stats count as nb,latest(_raw) , latest(result) as result , values(result) as list_result by type,host,object]

I find the correct results.

Image

Can you tell me the impact if we modify this join ?

Best regards,
MAStephen

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The payload names no repository file or test. Start by reproducing the two SPL searches against the _internal backup logs and compare the left-join and inner-join results; the work is done when the join behavior and the impact of changing it are verified and documented.

Written by the indexing model from the issue text.

Assessment

Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.