Dashboards & Visualizations

App not substituting Token for User Group, works for Admin when tested with Static Value

mwnci
New Member

So this is a LDAP integrated, simple application which takes Active Directory Groups replays them to Managers in a Dashboard so they can login using their AD Creds and check their Team composition / System Access (very basic IT Governance control) Up until recently, it worked well (Feb 2018), and then it stopped running.

The drop down populates with the manager name (username, value), the tok_Manager then seems to hang, as if the query will not execute, nothing changes on the dashboard (it does not give a null return/ or failed return / it just says "Search is waiting for input...")

The Search Query is solid (It does work when I put the Static Value for tok_Manager, drop down, when I am logged into ADMIN, so the Query Logic is solid ) so it could be I think it maybe:

  1. An APP permission issue / permission conflicts
  2. A token substitution to the Query error
  3. A stupid me issue, accidentally amending the code when I was doing other things

I've check the tables, and indexes and it's all correct. I've been bashing my head against a wall on this one for a couple of weeks...I know one of you is going to give me that "eureka moment" and lead me to the underlying issue - 😉

 <form script="custom_table_row_expansion.js">
      <label>Team Access Management</label>
      <fieldset submitButton="true" autoRun="false">
        <input token="tok_Managers" type="dropdown" searchWhenChanged="false">
          <label>Manager Name</label>
          <search>
            <query>|rest /services/authentication/current-context | table username  | rename username AS identity | join identity  [|inputlookup managers ]  | rename nick AS username | table username</query>
          </search>
          <fieldForLabel>username</fieldForLabel>
          <fieldForValue>Value</fieldForValue>
        </input>
      </fieldset>
      <row>
        <panel>
          <title>Team Composition as of today</title>
          <table id="expand_with_events">
            <title>Team Composition and Access Rights by Manager</title>
            <search>
              <query>| inputlookup managers | search nick="$tok_Manager$"  | rename nick AS Manager | append [|inputlookup identities] | search Manager="$tok_Manager$"  | table  nick identity bunit employeeID pbsCaresID description accountExpires pwdLastSet | sort bunit, nick | eval pwdLastSet=strftime(strptime(pwdLastSet,"%Y-%m-%dT%H:%M:%S.%6QZ"),"%d-%m-%Y %H:%M:%S")   | eval lastLogon=strftime(strptime(lastLogon,"%Y-%m-%dT%H:%M:%S.%6QZ"),"%d-%m-%Y %H:%M:%S") | eval lastLogon=if(ISNULL(lastLogon),"(never)", lastLogon) | rename nick AS Employee, bunit AS "Business Unit", description AS Description, accountExpires AS "Account Expiries", pwdLastSet AS "Last Pwd Change"</query>
              <earliest>0</earliest>
              <latest></latest>
            </search>
            <option name="count">10</option>
            <option name="dataOverlayMode">none</option>
            <option name="drilldown">none</option>
            <option name="link.visible">0</option>
            <option name="rowNumbers">false</option>
            <option name="wrap">true</option>
          </table>
      </panel>
    </row>
</form>
Tags (3)
0 Karma

mwnci
New Member

FIXED IT - The dropdown and tok_Manager at somepoint switched.... So the reference broke, it took me an age to find it.

So it should be this;_

Not this:-

alt text

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...