<?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: Need to send email notifications to the users and service-ids who are utilizing CPU. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-to-send-email-notifications-to-the-users-and-service-ids/m-p/690935#M235308</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254877"&gt;@bmanikya&lt;/a&gt;&amp;nbsp;please confirm if my understanding is correct:&lt;BR /&gt;You want to match the "user" field from the first screenshot with the "user" field from the&amp;nbsp;&lt;SPAN&gt;bd_users_hierarchy.csv lookup, and the "app_id" field from the third screenshot?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jun 2024 00:19:50 GMT</pubDate>
    <dc:creator>KendallW</dc:creator>
    <dc:date>2024-06-18T00:19:50Z</dc:date>
    <item>
      <title>Need to send email notifications to the users and service-ids who are utilizing CPU.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-send-email-notifications-to-the-users-and-service-ids/m-p/690452#M235157</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=XXX sourcetype=XXX [|inputlookup Edge_Nodes_All.csv where Environment="*" AND host="*" |fields host] |fields cluster, host, user, total_cpu
| join type=inner host [search `gold_mpstat` OR `silver_mpstat` OR `platinum_mpstat` OR `palladium_mpstat` [|inputlookup Edge_Nodes_All.csv where Environment="*" AND host="*" |fields host]
|stats max(eval(id+1)) as cores by host]
|eval pct_CPU = round(total_cpu/cores,2)
|stats max(total_cpu) as total_cpu, max(pct_CPU) as "CPU %" by user,host,cores
|table host user cores total_cpu,"CPU %"
|sort - "CPU %"|head 10&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bmanikya_0-1718190578365.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31287i5DED037E82C006BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bmanikya_0-1718190578365.png" alt="bmanikya_0-1718190578365.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can look at the above screenshot, from the second column we have ADS-IDs and service-IDS mostly end up with s,g,p according to our environments like silver, gold and platinum. We have ADS-IDS in&amp;nbsp;|&amp;nbsp; bd_users_hierarchy.csv lookup file, please check below screenshot.(Note: for security reasons, have to grayed out email addresses.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bmanikya_1-1718190828938.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31288iA011CF7E11A92342/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bmanikya_1-1718190828938.png" alt="bmanikya_1-1718190828938.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And service-IDS are in the below index, please check below screenshot&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index = imdc_ops_13m sourcetype = usecase_contact app_id="*" | dedup app_id | table _time app_id app_owner app_team_dl&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bmanikya_2-1718190933711.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31289iEA4242E8074AF429/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bmanikya_2-1718190933711.png" alt="bmanikya_2-1718190933711.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was using subsearch using join but not successful. Any help is appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 12:04:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-send-email-notifications-to-the-users-and-service-ids/m-p/690452#M235157</guid>
      <dc:creator>bmanikya</dc:creator>
      <dc:date>2024-06-12T12:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send email notifications to the users and service-ids who are utilizing CPU.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-send-email-notifications-to-the-users-and-service-ids/m-p/690935#M235308</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254877"&gt;@bmanikya&lt;/a&gt;&amp;nbsp;please confirm if my understanding is correct:&lt;BR /&gt;You want to match the "user" field from the first screenshot with the "user" field from the&amp;nbsp;&lt;SPAN&gt;bd_users_hierarchy.csv lookup, and the "app_id" field from the third screenshot?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 00:19:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-send-email-notifications-to-the-users-and-service-ids/m-p/690935#M235308</guid>
      <dc:creator>KendallW</dc:creator>
      <dc:date>2024-06-18T00:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send email notifications to the users and service-ids who are utilizing CPU.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-send-email-notifications-to-the-users-and-service-ids/m-p/690939#M235311</link>
      <description>&lt;P&gt;Yes&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 02:33:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-send-email-notifications-to-the-users-and-service-ids/m-p/690939#M235311</guid>
      <dc:creator>bmanikya</dc:creator>
      <dc:date>2024-06-18T02:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send email notifications to the users and service-ids who are utilizing CPU.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-send-email-notifications-to-the-users-and-service-ids/m-p/690943#M235312</link>
      <description>&lt;P&gt;Try something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=XXX sourcetype=XXX 
	[|inputlookup Edge_Nodes_All.csv where Environment="*" AND host="*" 
	 |fields host] 
|fields cluster, host, user, total_cpu
| join type=inner host [search `gold_mpstat` OR `silver_mpstat` OR `platinum_mpstat` OR `palladium_mpstat` [|inputlookup Edge_Nodes_All.csv where Environment="*" AND host="*" |fields host]
|stats max(eval(id+1)) as cores by host]
|eval pct_CPU = round(total_cpu/cores,2)
|stats max(total_cpu) as total_cpu, max(pct_CPU) as "CPU %" by user,host,cores
|table host user cores total_cpu,"CPU %"
|sort - "CPU %"|head 10

| lookup bd_users_hierarchy.csv user OUTPUT user, email as user_email, UserName, Director, VP,Director_email,VP_email

| join left=L right=R where L.user=R.app_id [index = imdc_ops_13m sourcetype = usecase_contact app_id="*" | dedup app_id | table _time app_id app_owner app_team_dl]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 03:37:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-send-email-notifications-to-the-users-and-service-ids/m-p/690943#M235312</guid>
      <dc:creator>KendallW</dc:creator>
      <dc:date>2024-06-18T03:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need to send email notifications to the users and service-ids who are utilizing CPU.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-send-email-notifications-to-the-users-and-service-ids/m-p/691494#M235452</link>
      <description>&lt;P&gt;No results after executing the query. There is a lookup file called "bd_users_hierarchy.csv" which contains Active Directory users and&amp;nbsp;"mapr_ticket_contacts.csv " where in UseCase information exists. Please check below screenshot and query i have written to find out Top CPU Users and Usecases on all edge nodes.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bmanikya_0-1719286381276.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31437i252AA78C7125CD71/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bmanikya_0-1719286381276.png" alt="bmanikya_0-1719286381276.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the inputlookup file called ""mapr_ticket_contacts.csv", Usecases ends with letter "s,q,g,p" need to trim down and get email addresses. For example&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bmanikya_2-1719287002129.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31439i95C0089431FE37EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bmanikya_2-1719287002129.png" alt="bmanikya_2-1719287002129.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If i remove the letter "p"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bmanikya_3-1719287045727.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31440i58C191E6D161F75C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bmanikya_3-1719287045727.png" alt="bmanikya_3-1719287045727.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edge Node Information&amp;nbsp; ---&amp;nbsp;Edge_Nodes_All.csv&lt;/P&gt;&lt;P&gt;Active Directory Users&amp;nbsp; ---&amp;nbsp;bd_users_hierarchy.csv&lt;/P&gt;&lt;P&gt;UseCases --&amp;nbsp;mapr_ticket_contacts.csv ( Need to trim down letter "s,q,g,p")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried with the below splunk query, but not getting results&lt;/P&gt;&lt;P&gt;index=imdc_*_os sourcetype=ps1 [|inputlookup Edge_Nodes_All.csv where Environment="*" AND host="*" |fields host] |fields cluster, host, user, total_cpu&lt;BR /&gt;| join type=inner host [search `gold_mpstat` OR `silver_mpstat` OR `platinum_mpstat` OR `palladium_mpstat` [|inputlookup Edge_Nodes_All.csv where Environment="*" AND host="*" |fields host]&lt;BR /&gt;|stats max(eval(id+1)) as cores by host]&lt;BR /&gt;|eval pct_CPU = round(total_cpu/cores,2)&lt;BR /&gt;|stats max(total_cpu) as total_cpu, max(pct_CPU) as "CPU %" by user,host,cores&lt;BR /&gt;|table host user cores total_cpu,"CPU %"&lt;BR /&gt;| search NOT user IN ("root","imdcsup","hadpsup")&lt;BR /&gt;|sort - "CPU %"|head 10&lt;BR /&gt;| join type=left user&lt;BR /&gt;[| inputlookup bd_users_hierarchy.csv| rename email as user_email&lt;BR /&gt;| table user,user_email]&lt;BR /&gt;| join type=left user&lt;BR /&gt;[| inputlookup mapr_ticket_contacts.csv&lt;BR /&gt;| eventstats max(Modified_Time) as Modified_Time_max by UseCase&lt;BR /&gt;| where Modified_Time=Modified_Time_max&lt;BR /&gt;| eval Modified_Time=if(Modified_Time=0,"Not Updated",strftime(Modified_Time,"%Y-%m-%d %H:%M"))&lt;BR /&gt;| rename Updated_By as "Last_Updated_By",Modified_Time as "Last_Modified_Time"&lt;BR /&gt;| rex field=UseCase "(?&amp;lt;UseCase&amp;gt;.*)."&amp;nbsp;&amp;nbsp;&lt;BR /&gt;| rename UseCase as user&lt;BR /&gt;| rename Support_Team_DL as user_email&lt;BR /&gt;| table user,user_email]&lt;/P&gt;&lt;P&gt;Appreciate your quick response on the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 03:53:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-send-email-notifications-to-the-users-and-service-ids/m-p/691494#M235452</guid>
      <dc:creator>bmanikya</dc:creator>
      <dc:date>2024-06-25T03:53:07Z</dc:date>
    </item>
  </channel>
</rss>

