Tag: TekStream

  • Simplifying AWS Infrastructure with SSO, CLI, CodeCommit and Terraform

    Simplifying AWS Infrastructure with SSO, CLI, CodeCommit and Terraform

    A Best Practice Guide to Referencing Remote Terraform Modules Stored in CodeCommit Using SSO Temporary Credentials

    By Brandon Prasnicki, Senior Solutions Architect, Cloud

    The modern cloud ecosystem offers an abundance of tools and services designed to simplify infrastructure management, enhance security, and streamline development workflows. Among these, AWS Single Sign-On (SSO), the AWS Command Line Interface (CLI), AWS CodeCommit, and Terraform stand out as powerful solutions for automating and managing cloud resources efficiently.

    Terraform is an open-source tool that allows you to define infrastructure as code, making it easier to create and manage AWS resources consistently by using re-usable modules.  By passing variables into these modules you can re-use the same templated code to create unique resources quickly and efficiently.

    AWS SSO simplifies the management of user access to AWS accounts and applications, allowing users to sign in using a single set of credentials. When integrated with the AWS CLI, it enables seamless access to AWS services from the command line, adhering to the principle of least privilege.

    AWS CodeCommit is a managed source control service that hosts Git repositories, including those containing Terraform modules. AWS CodeCommit is low cost and lives right within your AWS environment and can be secured just like your other AWS resources using AWS SSO and iam policies.

    This article assumes you have some basic Terraform knowledge, but you may want to better organize your code and make use of remote modules. AWS CodeCommit may be a good choice for this Terraform code, however you may have been challenged (as I was) to discover how to make use of a common module repository.

    Many examples you will find searching the internet will be limited in regards to putting all the pieces together to make use of remote Terraform modules you may have created for re-use in your CodeCommit repository. When it comes to referencing CodeComit repositories and using SSO and related AWS profiles to authenticate and reference these modules, the ‘How-To’ in a best practice sort of way is a bit hard to find. This article will guide you through leveraging these tools to configure AWS SSO for CLI access, manage AWS profiles, and deploy an Amazon EC2 instance profile using a remote CodeCommit Terraform module.

    Getting Started with AWS SSO and CLI

    Configuring AWS SSO for CLI Access

    1. Ensure AWS CLI Version 2.x: AWS SSO requires AWS CLI version 2.  Check your version with aws –version and update if necessary.
    2. Configure SSO: Run aws configure sso and follow the prompts. You’ll need to provide your SSO start URL, SSO region, account ID, and role name. This process authenticates your session and sets up an SSO profile in the AWS CLI.
    3. To login to SSO using a profile configured in your main.tf, use aws sso login –profile <profile-name>.  You will see a browser login to authenticate via SSO and generate a token for your cli session.
    4. Use Your SSO Profile: List available profiles using aws sso list-profiles. To use a specific profile, include –profile <profile-name> in your CLI commands. 

    The profile configuration can also be seen, verified and modified in your .aws/config file:

    [profile Dev]

    sso_start_url = https://<sso url>/start

    sso_region = us-east-1

    sso_account_id = <account number>

    sso_role_name = AWSAdministratorAccess

    region = us-east-1

    These profiles will correspond to the profile configuration in your terraform code:

    Main.tf:

    provider "aws" {
    region  = var.region
    profile = var.aws_profile
    }

    terraform.tfvars

    aws_profile = "Dev"
    region = "us-east-1"

    With SSO configured, you’re now ready to interact with AWS services through the CLI and Terraform using your SSO credentials.  Any resources created will be created in the Dev account because of the profile I have configured in my aws config file and referenced in my main.tf of my workload terraform environment.

    Automating EC2 Instance Profile Deployment with Terraform and AWS CodeCommit

    A common use case for using common modules we see often is defining an EC2 profile to allow SSM functionality. A common module for this is rather simple, and simply attaches the ‘AmazonSSMManagedInstanceCore’ policy to a newly created instance profile/role. Since this is something we do over and over again and very little change is needed to the module, it is a good use case for a shared module in a remote repository and reference the module when the workload configuration needs it.

    To deploy an EC2 instance profile using Terraform, you can reference a Terraform module stored in a CodeCommit repository separate from your environment configuration. This approach promotes code reuse and simplifies infrastructure management. Then during instance creation, we can reference this module output to attach the instance profile to the instance we create in the Dev account using the Dev profile (or users can use it from the UI when launching instances etc). Of course, the shared module could be more complex and take in different variables for policies to attach and loop etc, but that is beyond the scope of the point for this article.

    To create a CodeCommit repository, simply navigate to the CodeCommit service and create the repository. Note, you may choose to keep code in a separate account from where your other AWS resources live (compute, EC2, VPC etc). It is important to remember that it isn’t where your code lives that matters, but rather the configuration of the profile related to your .aws/config that drives where resources are created.

    Referencing a Remote CodeCommit Terraform Module

    1. Create Your Terraform Configuration:

    When creating resources using a common Terraform module stored in another repository, update the module call in the file you are working on for the relevant AWS account environment as configured in your aws profile (e.g., main.tf).  To reference the remote CodeCommit module for deploying an EC2 instance profile, specify the module’s source attribute with the CodeCommit repository in the source line (all one line) in the format below, and then provide any required variables for the module:

    Here is an example of a call from my ‘Dev’ CodeCommit repository making use of the sharedmodules repository’s module ‘IAM_SSM_instance_profile’.  Common tags passes relevant environment specific names and tags into the shared module.

    module "IAM_SSM_instance_profile" {
    source = "git::codecommit::us-east-1://shared-
    services@sharedmodules//modules/IAM_SSM_instance_profile"
    common_tags = var.common_tags
    }

    An important note here is the AWS profile credentials in relation to where the repo exists.  Here it is ‘shared-services’ and is noted after the // in the source line.  It may be the case (and is generally best practice) that you may have your AWS CodeCommit code in an account not related to your workload account resources.   For this example, the code is in another account (shared-services).  While I am creating resources in the ‘Dev’ account profile, the code lives in the shared-services account for both the environment and shared modules, and therefore the profile is noted in the source path.  

    Another note is that for this example, this ‘shared-services’ account is in the same organization, and is using the same SSO login URL and authentication, but it is defined as another profile within the .aws/config file.  One aws login CLI command is all that is needed to authenticate as long as a profile is configured for both profiles and using the same SSO configuration.  This can be configured using the aws configure sso as seen above, or again manually configured/verified in your .aws/config file:

    [profile shared-services]

    sso_start_url = https://<sso url>/start

    sso_region = us-east-1

    sso_account_id = <account number>

    sso_role_name = AWSAdministratorAccess

    region = us-east-1

    2. Initialize and Apply Terraform:

    •     Initialize Terraform: Run terraform init to initialize the working directory, allowing Terraform to download the necessary plugins and modules.  This will install from the remote repository using the shared-services profile.

    •     Apply Configuration: Execute terraform apply to create the resources defined in your Terraform configuration. Terraform will prompt you for confirmation before proceeding.  This will apply the configuration into your ‘Dev’ environment using your ‘Dev’ profile.

    Conclusion

    Integrating AWS SSO with the CLI, combined with the power of Terraform and AWS CodeCommit, provides a robust framework for managing AWS resources. By following the steps outlined above, developers can streamline their workflows, enhance security, and efficiently deploy and manage EC2 instances and other AWS services. This approach not only saves time but also ensures that infrastructure deployments are consistent, repeatable, and scalable and follow best practices in modular design and leveraging SSO for temporary credentials and least privilege.

    Read more AWS blogs here, and find details on the AWS services TekStream offers here. And, as always, submit your questions on the form below. Thanks!

  • Routing PII Data to Multiple Indexes

    Routing PII Data to Multiple Indexes

    By Eric Levy, Splunk Consultant & Zubair Rauf, Team Lead, Cybersecurity Engineering

    As Splunk Consultants we often come across customers who log personally identifiable information (PII) data on their systems that need to be indexed into Splunk for various use-cases. This data can be part of but not limited to sales logs, health records, and many other types of log files. This data can be used by various teams which may or may not require access to the PII to build analytics on this data for their daily business needs.

    Oftentimes, multiple teams interact with the same data, but some teams would need to have sensitive portions masked/removed. In this blog post we will talk about a use-case which deals with logs from a sales system that records customer’s credit card information when a sale is processed and generates error logs if something doesn’t go as planned.

    We used a custom-built script to generate some sample logs which are shown below. The script uses random words from the dictionary to record error messages:

    2024-01-11 11:22:38: [TransactionID=1259] [CreditCardNumber=1516-3643-1843-5285] [TransactionAmount=265.81] [TransactionStatus=0]
    2024-01-11 11:22:41: [TransactionID=1606] [CreditCardNumber=3301-5491-1216-2042] [TransactionAmount=49.29] [TransactionStatus=0]
    2024-01-11 11:22:44: [TransactionID=1814] [CreditCardNumber=8894-10012-6514-9377] [TransactionAmount=878.50] [TransactionStatus=1]
    2024-01-11 11:22:48: [ErrorMessage=piscian iodine tussive intenability alody trypanosomatous hypabyssal supervast splashing japishness ] [ErrorStackTrace=piscian iodine tussive intenability alody trypanosomatous ]
    2024-01-11 11:22:51: [TransactionID=1735] [CreditCardNumber=2525-2750-4478-8785] [TransactionAmount=275.86] [TransactionStatus=1]
    2024-01-11 11:22:55: [ErrorMessage=monadelphous triakistetrahedral slippery belage pungapung pustule leucophanite mantispid spiritualty misdetermine ] [ErrorStackTrace=monadelphous triakistetrahedral slippery belage pungapung pustule leucophanite mantispid spiritualty ]
    2024-01-11 11:22:58: [TransactionID=1470] [CreditCardNumber=9384-8198-3585-2396] [TransactionAmount=370.37] [TransactionStatus=0]
    2024-01-11 11:23:02: [ErrorMessage=Sunil Gaditan piaster pudicity tarkeean Juan ] [ErrorStackTrace=Sunil Gaditan piaster pudicity tarkeean Juan Sulafat trowelful ]

    We will explore two methods to route and filter the same data and index it in two different indexes. We will use the Splunk props.conf and transforms.conf configuration files to transform our data and achieve the desired results.

    Splunk‘s props.conf file allows Splunk admins to configure how the incoming data will be parsed — how to break events in a log stream, parse timestamps, call transforms to data, and create fields. The rules defined in transforms.conf are applied in the props configuration.

    Splunk’s transforms.conf file allows Splunk admins to configure rules for transforming data. It allows users to mask data, create fields at index time, rewrite fields, and configure lookups.

    The props.conf and transforms.conf configurations reside on search heads, indexers, and heavy forwarders, as well as universal forwarders in some cases. More details about Splunk’s props can be found in my colleague’s blog post – Data Onboarding in Splunk

    Method 1 – Mask PII and send all data to a separate index

    The first method demonstrates how to send all sales log data (transactions and error logs) to a separate index where teams who need access to masked data for their job can use the data.

    The unmasked sales data is ingested as the sourcetype named private_sourcetype (for ease of understanding) into the private_index. The configs can be deployed to a new TA that can be used for parsing or $SPLUNK_HOME/etc/system/local/props.com|transforms.conf files.

    With this method, we will first clone the private_sourcetype into a new sourcetype called public_sourcetype, where PII will be masked, and then route it to a public_index.

    Parsing for both private_sourcetype and public_sourcetype should be done by using the props.conf settings shown further down this post.

    To start, in our transforms.conf, we define the transform stanza that will clone our sourcetype. The cloned sourcetype will perform all remaining transformations.

    ###transforms.conf
    [clone_sourcetype]
    CLONE_SOURCETYPE = public_sourcetype
    REGEX = .
    DEST_KEY = _METADATA:Index
    FORMAT = public_index
    WRITE_META = true
    

    This stanza calls the CLONE_SOURCETYPE command, which is the “secret sauce” of this trick. CLONE_SOURCETYPE allows you to duplicate data into another sourcetype. We then set the DEST_KEY to modify the index, indicating through REGEX value of .indicating that we want to replace the entire value and setting FORMAT to the name of the new index – in this case, “public_index” (since it will house our masked data).

    Below props.conf shows how the transform is applied to the sourcetype. These props for the private_sourcetype is using the Super Six recommended settings to parse the logs while ingesting into Splunk.

    ###props.conf
    [private_sourcetype]
    LINE_BREAKER = ([rn]+)
    SHOULD_LINEMERGE = false
    TIME_PREFIX = ^
    TIME_FORMAT = %Y-%m-%d %H:%M:%S
    MAX_TIMESTAMP_LOOKAHEAD = 20
    TRUNCATE = 200
    TRANSFORMS-public_sourcetype = public_sourcetype
    

    The second set of transforms that will be included in the same transforms.conf file will mask the data the before it is indexed into the new public_index so that it can be consumed by the right people without exposing PII data.

    ###transforms.conf
    [mask_credit_card_info]
    REGEX = ^(.*?)CreditCardNumber=d{4,5}-d{4,5}-d{4,5}-d{4,5}(.*)$
    FORMAT = $1CreditCardNumber=XXXX-XXXX-XXXX-XXXX$2
    DEST_KEY = _raw
    

    The syntax is very similar to how we replaced the index name for the cloned data – we specify our REGEX for the events we want to target (which, in this case, is anything with a credit card number), then apply the FORMAT to the specific portion of the event we want to replace (hence the event being surrounded by $1 and $2), and finally set our DEST_KEY to mask our data within the _raw event.

    To apply these transforms we use the props.conf settings shown below to the public_sourcetype stanza:

    ###props.conf
    [public_sourcetype]
    LINE_BREAKER = ([rn]+)
    SHOULD_LINEMERGE = false
    TIME_PREFIX = ^
    TIME_FORMAT = %Y-%m-%d %H:%M:%S
    MAX_TIMESTAMP_LOOKAHEAD = 20
    TRUNCATE = 200
    TRANSFORMS-mask_credit_card_info = mask_credit_card_info
    

    When all these props and transforms are applied the private_index should show the unmasked data and the public_index should show the masked data:

    A screenshot of Splunk log events showing raw PII data, including credit card numbers and transaction amounts, along with index and sourcetype metadata.
    A screenshot of Splunk log events displaying masked PII data, where credit card numbers are replaced with X's, and the data is routed to a public_index.

    Method 2 – Filter and route error logs to a separate index

    With this method, we will explore how to filter and route error logs to the public_index. With this method we do not need to mask the PII as it is not being routed to the public_index.

    To start, like we did in method 1, we will clone the sourcetype to sales_error_log (to make it easy to identify the data) using the transforms.conf config file.

    ###transforms.conf
    [clone_sourcetype]
    CLONE_SOURCETYPE = sales_error_log
    REGEX = ^.*ErrorMessage=
    DEST_KEY = _MetaData:Index
    FORMAT = public_index
    WRITE_META = true
    

    In the above clone_sourcetype transforms stanza, we use the CLONE_SOURCETYPE parameter to specify a name for the new source. As we are only cloning the error message events, we specify a REGEX that matches the relevant event format. We also add DEST_KEY to identify that the destination for these new duplicated events is the public_index.

    We apply these transforms in the props.conf to the private_sourcetype and also create a new stanza for the sales_error_log so that Splunk can easily parse the duplicated logs as well without issue.

    [private_sourcetype]
    LINE_BREAKER = ([rn]+)
    SHOULD_LINEMERGE = false
    TIME_PREFIX = ^
    TIME_FORMAT = %Y-%m-%d %H:%M:%S
    MAX_TIMESTAMP_LOOKAHEAD = 20
    TRUNCATE = 200
    TRANSFORMS-clone_private_sourcetype = clone_sourcetype
    
    [sales_error_log]
    LINE_BREAKER = ([rn]+)
    SHOULD_LINEMERGE = false
    TIME_PREFIX = ^
    TIME_FORMAT = %Y-%m-%d %H:%M:%S
    MAX_TIMESTAMP_LOOKAHEAD = 20
    TRUNCATE = 200
    

    With these props and transforms settings, we should be able to duplicate the error logs and send the duplicated copy to the public_index for consumption.

    A screenshot of Splunk log events showing unmasked PII data, including credit card numbers and transaction information, along with error messages and source configuration details.
    A screenshot of Splunk error logs displaying events with ErrorMessage and ErrorStackTrace fields, showing data from a sales_error_log sourcetype.

    Here we’ve outlined two ways you can route sensitive PII data to multiple indexes using props and transforms without duplicating at the source. The first puts the same data in both indexes while redacting sensitive information (in this case, a credit card number) while the second separates regular events from error messages. Both approaches show Splunk’s flexibility in data management configurations and how it can provide tailored solutions for a wide array of use cases.

    Find other Splunk blogs here, Splunk offerings here, and always feel free to reach out if you have any questions. Happy Splunking!

  • Containerization and Kubernetes: The Backbone of Scalable and Efficient Applications 

    Containerization and Kubernetes: The Backbone of Scalable and Efficient Applications 

    In today’s fast-paced digital landscape, modernizing your applications is crucial for maintaining competitive advantage. However, choosing the right application modernization service requires careful consideration. First, it’s essential to evaluate your existing infrastructure. Understanding the current state of your applications, dependencies, and workloads helps in identifying the areas that need modernization and the potential challenges you might face. 

    In many situations, utilizing container-based services is a good place to start.  When looking for outside assistance in modernizing your workloads, look for service providers with proven expertise in Kubernetes and containerization. Check their track record, case studies, and client testimonials. Experienced providers are more likely to understand the nuances of your industry and offer tailored solutions that align with your business goals. 

    Containerization

    In case you’re wondering, containerization is a technology that packages software code along with all its dependencies, such as libraries and configuration files, into a single, lightweight executable unit. This container can run consistently across different computing environments, making it highly portable and efficient. 

    Containers encapsulate an application and its dependencies into a single package. This package includes everything needed to run the application, except for the operating system kernel, which is shared with other containers on the same host. This approach eliminates the “it works on my machine” problem by ensuring that the application runs the same way regardless of where it is deployed. 

    5 Key Benefits of Containerization

    In our experience, these five things make containerization vital to successful modern applications:

    1. Portability – Containers can run on any platform or cloud without modification, ensuring consistent performance across different environments. 
    1. Efficiency – Containers share the host system’s operating system kernel, making them more resource-efficient than virtual machines (VMs). 
    1. Scalability – Containers can be easily scaled up or down to meet demand, making them ideal for dynamic workloads. 
    1. Isolation – Each container operates in its own isolated environment, which enhances security and reduces the risk of conflicts between applications. 
    1. Speed – Containers can start up quickly because they do not require a full operating system to boot up. 
    Click here for modern application development content.

    Kubernetes

    Another key component of cloud-native application modernization, Kubernetes is widely regarded as one of the best tools available for those looking to deploy and manage containers for their workloads.  It is an open-source platform that automates the management, deployment, and scaling of containerized applications and services, and these are the top 6 reasons we use it: 

    1. Automation – Kubernetes excels at automating the deployment, scaling, and management of containerized applications. This reduces the manual effort required and ensures that applications run smoothly and efficiently. 
    1. Scalability – as important here as it is to the general containerization technology. Kubernetes can automatically scale applications up or down based on demand. This includes horizontal scaling (adding more instances) and vertical scaling (adding more resources to existing instances), ensuring optimal performance and resource utilization. 
    1. High Availability and Reliability – Kubernetes provides high availability by distributing workloads across multiple nodes. If a node fails, Kubernetes automatically redistributes the workload to other nodes, minimizing downtime and ensuring continuous operation. 
    1. Self-Healing – Kubernetes has built-in self-healing capabilities. It can automatically restart failed containers, replace and reschedule them when nodes die, and kill containers that don’t respond to user-defined health checks. 
    1. Extensibility – Kubernetes is highly extensible, allowing users to add custom features and integrate with other tools. Its open-source nature means there is a large ecosystem of plugins and extensions available. 
    1. Cost Efficiency – By optimizing resource usage and automating many operational tasks, Kubernetes can help reduce operational costs. It also supports multi-cloud and hybrid cloud strategies, allowing organizations to choose cost-effective hosting solutions. 

    Kubernetes stands out as a leading containerization management tool due to its robust automation, scalability, high availability, portability, self-healing capabilities, extensibility, and strong community support. These features make it an ideal choice for managing containerized applications in diverse and dynamic environments.  

    We look forward to sharing our modern application development tools, solutions and approaches with your firm. If you have any more questions or need further details, ask us using the form below.

  • Meet Christy Szanti

    Meet Christy Szanti

    TekStream Women in Tech Feature

    Our latest Women in Tech story is here. Meet Christy Szanti, Recruiter/Partner Manager! We asked Christy about her career, accomplishments and her TekStream tenure. Read on for her insights and experiences: you’ll be inspired by her journey.

    As a Recruiter for TekStream, Christy is responsible for screening, sourcing and submitting internal candidates for our consulting practices. Over the past 2 years, Christy has worked on helping to staff the Managed Detection and Response (MDR) team which includes security analysts and Splunk certified consultants that support the security program. Christy’s first career was in environmental engineering consulting after graduating from Purdue University with an environmental engineering degree. After staying home to raise children, Christy spent the next 14 years teaching upper-level mathematics at a top-ten public charter high school, the Gwinnett School of Mathematics, Science & Technology (GSMST). She is certified to teach High School Mathematics and K-12 Computer Science classes and holds Masters Degree In Mathematics Education. We are fortunate to have her amazing talent on our team!

    Why did you choose cybersecurity as your career?

    Christy Szanti: As a recruiter for a company who constantly needs cybersecurity talent, I love finding the right people who have the technical and soft skills to do well in these roles. To be able to find these people, I need to know what each role needs, though I actually do not do the technical part myself. I love recruiting in the cybersecurity field because I speak to people all day long who are very passionate about what they do and how they are helping people. My first two careers were in environmental engineering and Mathematics Education and I feel like those past experiences help me be a good recruiter for technology and cybersecurity specifically.

    What is your biggest accomplishment, and what are you most proud of as it relates to your career?

    CZ: As this is my 3rd career, I am most proud that I was able to transition from two very different careers, into recruiting. I also am proud of helping build out TekStream’s MDR talent, since I have been involved in hiring the majority of the talent that works in our MDR program.

    What advice would you give a young woman pursuing a career in technology?

    CZ: In general, when I advised students on what they wanted to do in their life, I always said to start with something you love. What is your passion? What are you good at? Another piece of advice is to find a mentor. In every role that I have had, there has always been someone that mentored me and that helps a lot.

    Why did you choose TekStream?

    CZ: When I decided to stop teaching, I reached out to my friend (Diane Vogel) who is also a recruiter at TekStream to see if she could help me find a job. I sent her my resume and she suggested that I apply to TekStream instead of applying somewhere else. I absolutely love recruiting at TekStream, especially hiring fellow co-workers! It is so rewarding to see when the people that I helped bring into the company do well and also love it here.

    Christy, thanks for sharing your experience and your advice. We are glad you’re on our team!

  • Meet Angela Lindsey

    Meet Angela Lindsey

    TekStream Women in Tech Feature

    Our latest Women in Tech story is here. Meet Angela Lindsey, Team Lead, Support and Managed Services! We asked Angela about her career, accomplishments and her TekStream tenure. Her insights and experiences are an inspiration.

    Angela is a dedicated, high quality and results oriented technical architect with more than 26 years of corporate industry experience. As a seasoned Oracle WebCenter Content developer/administrator/designer, she has installed, upgraded and migrated more than 190 instances. She has her AWS Solutions Architect badge, Splunk Cybersecurity Defense Analyst badge, and Splunk Core Certified Consultant badge, and has completed countless certification courses. She has taken on the role of Splunk Support Team lead and manages four employees. Her resourcefulness and passion to provide exceptional customer experience is recognized by her peers at TekStream, and we are fortunate to have her on our team.

    Why did you choose cybersecurity as your career?

    Angela Lindsey: I chose cybersecurity as my career because I have a deep passion for technology and a strong desire to protect people and organizations from digital threats. The rapid evolution of cyber threats fascinates me, and I enjoy the challenge of staying one step ahead of potential attackers. I believe that ensuring the safety and integrity of data is crucial in today’s interconnected world.

    Additionally, the sense of fulfillment I get from solving complex problems and contributing to a safer digital environment drives me to continuously learn and grow in this dynamic field. Cybersecurity allows me to blend my interests in technology and problem-solving while making a meaningful impact.

    What is your biggest accomplishment, and what are you most proud of as it relates to your career?

    AL: One of my biggest accomplishments thus far has been becoming the only female team lead at TekStream, and successfully leading a team of amazing consultants that have the passion for excellence that I do. I’m particularly proud of how we foster a culture of security awareness among employees through training and engagement initiatives. Witnessing the positive impact of our efforts, with staff becoming more vigilant and proactive about security practices, reinforces my belief in the importance of collaboration and education in cybersecurity. This achievement not only strengthens our defenses but also empowers individuals to take ownership of their role in maintaining a secure environment.

    What advice would you give a young woman pursuing a career in technology?

    AL: To a young woman pursuing a career in technology or cybersecurity, I would say embrace your curiosity and never underestimate your potential. The tech field is diverse and continually evolving, so staying open to learning and adapting is crucial. Don’t be afraid to ask questions and seek mentorship from those already in the industry; building a strong network can provide invaluable support and insights. Remember, your unique perspective is an asset, and representation matters in this field. Stay confident in your abilities, advocate for yourself, and take on challenges that push you out of your comfort zone. Ultimately, believe in your passion and perseverance, as they will be your greatest allies on this journey.

    Why did you choose TekStream?

    AL: I chose TekStream because it aligns perfectly with my values and career aspirations. TekStream’s commitment to innovation and ethical practices in technology really resonates with me, as I believe in using tech to create positive change. The collaborative work environment and emphasis on continuous learning also appeals to me, providing opportunities for professional growth and skill development. I knew that joining TekStream would allow me to make a meaningful impact while being part of a team that shares my vision for a safer, more connected world.

    Thank you for sharing your experiences with us, Angela!

  • How Resilient Is Your Cybersecurity Posture?  

    How Resilient Is Your Cybersecurity Posture?  

    Between adopting new technologies, modernizing operations and navigating the increased sophistication in today’s cyberattacks, how confident are you that your cybersecurity posture can withstand future cyberattacks? Ask yourself: 

    • Do you have the visibility needed to protect your most critical assets? 
    • Can your organization quickly respond to and effectively remediate a breach or attack? 
    • Are your security policies responsive to the rate of change in your business? 

    If you’re uncertain about the answers, it can be tempting to invest in more technologies to fortify your security posture. Yet the solution is often best addressed by leveraging a cyber resilience framework that enables you to make better use of existing assets and capabilities. 

    The Importance of a Cybersecurity Risk and Remediation Plan  

    The cybersecurity function is twofold: prevention and recovery. Both require highly dynamic capabilities to mitigate catastrophic risk in an accelerating climate of change. A cyber resilience framework addresses these issues and sets your organization up for long-term success.  

    It helps you: 

    • Gain greater visibility into your expanding threat surface  
    • Identify what needs to be protected and your organization’s risk tolerance for each  
    • Validate your program’s resiliency before, during and after events  
    • Pinpoint how your current cybersecurity posture can be improved daily with real-time data 
    • Determine the right resource mix to optimize costs and identify cost-savings 

    More importantly, it equips you with the ability to devise a comprehensive approach by providing you with a pragmatic roadmap prioritized by risk and complexity. In turn, you’re better able to communicate with internal stakeholders on what the most pressing vulnerabilities are and how to get ahead of them before threat actors exploit them.  

    Developing a Cybersecurity Resilience Framework

    Undergoing a cybersecurity resilience framework exercise helps identity potential vulnerabilities so you can develop the best defense for your organization. At TekStream, there are three approaches we often deploy to help clients create a tailored framework that evolves and grows as their threat surface expands. 

    One approach is to use the NIST framework to identify coverage gaps and cost-saving opportunities with a risk-based review of your cybersecurity posture. You’ll want to look at policy gaps across your people, tools and processes. Then, you want to dig deeper into critical areas that need specific or additional focus to ensure a holistic review of your cyber infrastructure.  

    Another approach is to enhance your security posture with an ethical hacking exercise, also known as pen testing, to identify and validate your vulnerabilities. At TekStream, we help clients accomplish this by undergoing red-and-blue-teaming exercises.  

    Results from these exercises are then used to devise a plan for addressing these vulnerabilities. This is also a great opportunity to train your people on how to identify and mitigate common attack scenarios.  

    Finally, the last approach you can take is to look at your program level vulnerabilities across your portfolio. Rather than looking at detailed vulnerabilities, you look at your overall processes. The goal is to identify where the biggest gaps are and how to cover them so you can meet overall high-level objectives.    

    While you can take any of the three approaches to develop your cybersecurity framework based on your immediate needs, we often advise clients to take a comprehensive approach and undergo all three. Instead of focusing on one area, take a phased approach to developing your framework to ensure all your bases are covered. 

    The Value of Fortifying Your Cybersecurity Posture With a Partner

    Keeping pace with today’s changing and rising threats is a challenge most cybersecurity teams face. It’s a common situation we come across in our line of business. As companies adopt more interconnected technologies in their bid for innovation, it also opens the door to potential cyberattacks. 

    Yet a lack of time and resources amid changing business priorities prevent most organizations from conducting a thorough review of their cyber programs that considers people, tools and processes. If this situation sounds familiar, leveraging a partner can help you gain the visibility you need.  

    An experienced Risk Remediation partner can provide both the expertise and hands on support you need to execute your roadmap and enhance your security posture. They can use their knowledge of best-in-class solutions like Splunk and AWS to develop the right configuration based on organizational needs while addressing resource gaps.  

    For example, we recently worked with Georgia Technology Authority (GTA) to develop a cyber resilience framework for their organization as part of their cloud-first strategy. Using our expertise as an AWS Advanced Tier Services partner, we helped configure AWS and Microsoft Azure to better address gaps while flagging growth opportunities and cost savings. 

    Setting Your Cybersecurity Program for Long-Term Success

    In 2023 alone, the number of intrusions into cloud-hosted environments increased by 75%,  and that number is expected to grow as businesses continue to transform and innovate. At a time when threat actors are getting more sophisticated by the day, the question of when your defenses will be tested is not an if but when. The question then becomes, do you have a cybersecurity program that is responsive to the rate of change within your organization or your infrastructure?  

    If you’re struggling to answer this question, you may benefit from a comprehensive review. Our team can help when you’re ready to take the next step.

  • What is MDR?

    What is MDR?

    Exploring Managed Detection and Response for Enhanced Cybersecurity

    Cybersecurity is not a set-and-forget task — your business needs to keep pace with the ever-changing tactics of cybercriminals. However, your organization has core priorities besides security, such as growth and customer satisfaction. How can you make sure security is managed well without breaking the budget? The answer may lie in leveraging a managed detection and response (MDR) service like the kind we offer at TekStream Solutions.

    MDR is designed to provide real-time threat detection and rapid response, ensuring your business remains secure. But what is MDR, and why should you use it? Join us as we explore how MDR helps your business stay ahead of cybercriminals.

    What is Managed Detection and Response? 

    MDR, meaning Managed Detection and Response, involves continuous, proactive monitoring of an organization’s IT infrastructure for malicious activities or policy violations. It’s a comprehensive solution that leverages advanced technology, expert analysis, and proactive threat hunting to scan endpoints, networks, applications, and other digital assets.

    MDR detects anomalies that could indicate a security incident and analyzes and responds to cybersecurity threats in real-time. It goes beyond traditional security measures by providing continuous monitoring, threat intelligence, and rapid incident response capabilities.

    MDR consists of several key components:

    1. Continuous monitoring: MDR services employ advanced tools to monitor your network, endpoints, and cloud environments 24/7, looking for any signs of suspicious activity or potential threats.
    2. Threat detection and analysis: MDR systems use a combination of machine learning, behavioral analytics, and human expertise to identify known and unknown threats, including zero-day exploits and advanced persistent threats (APTs).
    3. Rapid response: Once a threat is confirmed, MDR teams swiftly contain and neutralize it, minimizing potential damage to your systems and data.
    4. Remediation: After addressing an immediate threat, MDR services help organizations implement measures to prevent similar incidents in the future and strengthen overall security posture.

    At TekStream Solutions, we offer cutting-edge MDR solutions that leverage the power of Splunk. Our solutions provide unparalleled visibility and protection across your entire digital ecosystem.

    What is MDR in cybersecurity for and why is it becoming an indispensable tool for businesses of all sizes? To understand its significance, we need to examine its place in the cybersecurity ecosystem.

    What is MDR’s Role in the Cybersecurity Ecosystem?

    While MDR cybersecurity services focus on monitoring, detection, and response capabilities, other components complement and enhance your cybersecurity posture. Let’s see how MDR compares to other common cybersecurity solutions:

    1. EDR (Endpoint Detection and Response): While EDR focuses solely on endpoints like computers and mobile devices, MDR takes a holistic approach by covering your entire IT infrastructure.
    2. SIEM (Security Information and Event Management): SIEM tools collect and analyze log data from various sources. MDR goes a step further by analyzing this data and providing active threat-hunting and response capabilities.
    3. MSSP (Managed Security Services Providers): MSSPs typically offer a broad range of security services. MDR, however, specializes in advanced threat detection and response, providing deeper expertise and more focused protection.

    MDR doesn’t replace these solutions—it works alongside them by filling gaps and providing an extra layer of security. Now that we’ve contextualized MDR within the broader security landscape, it’s time to unpack the unique advantages it offers in protecting digital assets.

    What Are the Benefits of MDR?

    Now that we understand how MDR fits into your cybersecurity ecosystem, let’s explore the tangible benefits it brings to your organization.

    Enhanced Threat Posture

    MDR utilizes advanced technologies and expert analysis to identify known and unknown threats. This helps to significantly improve an organization’s ability to detect sophisticated attacks that might slip past traditional security measures.

    Rapid Incident Response

    With 24/7 monitoring and a team of security experts at the ready, MDR enables swift responses to potential threats. Acting fast can dramatically reduce the impact of a security incident and potentially save organizations millions in breach-related costs.

    Access to Cybersecurity Expertise

    Managed detection and response provides organizations with access to skilled security professionals without needing an expensive in-house team that would likely get alert fatigue over time.

    Cost-Efficiency

    By outsourcing advanced security functions to an MDR provider, organizations can achieve a higher level of security at a lower cost than building equivalent capabilities in-house. MDR services often operate on a predictable subscription model, making cybersecurity budgeting more straightforward. Subscription models also make it easier to scale up and down when necessary.

    Compliance Support

    Many MDR services include features that help ensure compliance with various regulatory standards, such as HIPAA and GDPR. This ensures that organizations can more easily meet legal and industry obligations.

    While these benefits are significant, it’s important to regularly evaluate your MDR solution to ensure it continues to meet your organization’s changing security needs.

    MDR in Action: How it Enhances Your Cybersecurity Defense Strategy

    What is MDR capable of? Let’s unpack its operational benefits and see how it strengthens your defenses.

    Continuous Improvement

    As cyber threats evolve, so too must the defenses against them. MDR solutions are designed with this principle in mind for:

    • Threat intelligence updates: MDR providers constantly update their threat intelligence databases. Incorporating information about new threats into these updates makes it easier to recognize vulnerabilities and prepare for attacks.
    • Machine learning enhancements: Many MDR solutions use machine learning algorithms that get better at identifying anomalies and potential threats over time.
    • Procedural refinements: MDR providers regularly refine their response procedures based on real-world incidents and emerging trends to ensure they remain effective against new attacks.

    Real-Time Threat Monitoring

    MDR security systems maintain 24/7 surveillance. By constantly analyzing network traffic, user behavior, and system logs for any signs of suspicious activity, MDR protects your data at all times. This process goes beyond simple pattern matching; instead, it employs advanced behavioral analytics to identify anomalies that might indicate a threat.

    Advanced Analytics

    MDR leverages advanced analytics to turn raw data into actionable intelligence. These systems can handle massive volumes of data and process it at lightning speed. Even if it’s an attack the system hasn’t seen before, it analyzes patterns that might indicate a threat.

    Automated Responses

    Every second counts when it comes to cybersecurity. That’s why MDR incorporates automated responses to neutralize threats quickly. These systems come equipped with predefined response actions for common types of threats. The system can escalate complex threats to human analysts while taking initial containment measures to limit damage.

    Managed Detection

    The “managed” in MDR means you’re getting a tool and a service backed by expert human analysts. Here’s what that entails:

    • Expert monitoring: Skilled security professionals oversee the MDR system for an extra layer of vigilance.
    • Context and interpretation: Analysts interpret alerts in the context of your specific environment to reduce false positives.
    • Threat hunting: MDR teams proactively search for hidden threats that automated systems might miss.

    The human element in MDR ensures that you receive more than automated alerts—you receive informed, contextualized insights into your security posture.

    Response Capabilities

    When a threat is confirmed, MDR teams coordinate a response effort to ensure all necessary steps are taken to contain and neutralize a threat. For threats that require action from your internal team, MDR providers offer step-by-step guidance to ensure effective remediation.

    Integration with Existing Security Infrastructure

    MDR works alongside your existing security measures, enhancing rather than replacing your current tools and processes. MDR solutions can use data from your security tools, firewalls, and network devices to analyze weaknesses and fill gaps in your current security posture. Many MDR solutions provide a centralized dashboard with a holistic view of your security landscape.

    The next question is, how do you select an MDR provider who will ensure your business stays threat-resilient? Here are a few tips to help you find the right partner.

    How to Choose the Right MDR Services Provider

    The effectiveness of your MDR hinges on selecting the appropriate MDR services provider. We’ve outlined several key considerations that will guide you in finding the best fit for your MDR needs:

    Key Considerations

    • Expertise and experience: Look for providers with a proven track record in cybersecurity and specific expertise in your industry.
    • Technology stack: Ensure the provider uses the most up-to-date, best-in-class technologies for threat detection and response.
    • Scalability: The service should be able to grow with your organization and adapt to changing needs.
    • Compliance support: If you operate in a regulated industry, ensure the MDR provider can support your compliance requirements.
    • Pricing transparency: To avoid unexpected charges, look for providers that offer clear, detailed breakdowns of the cost of tools, analysts, and support.

    Assessing Technological Compatibility

    Check with potential providers to see if their tools will integrate smoothly into your technical setup without hindering productivity. Ensure that the provider offers APIs that integrate easily with your existing workflows.

    The ideal managed detection and response solution should be able to handle your current data volume and scale effortlessly as your business grows. For businesses leveraging cloud services, verifying that the MDR solution provides adequate coverage for your cloud environments is essential.

    Questions to Ask Providers

    When evaluating MDR providers, don’t be afraid to ask tough questions. Here are some essential ones to consider:

    1. How soon do you detect and respond to threats on average?
    2. Can you provide case studies or references from businesses similar to ours?
    3. What kind of training and support do you provide?
    4. How do you stay updated on the latest threats and attack vectors?
    5. What is your service’s incident response process?
    6. How do you handle data privacy concerns?
    7. What level of customization do you offer?

    These considerations will help you select a partner to strengthen your organization’s holistic cybersecurity management.

    Partner with TekStream for Expert MDR

    The need for robust, proactive cybersecurity measures cannot be overstated as cyber threats evolve in complexity and frequency. MDR offers a comprehensive, expert-driven approach to threat detection and incident response that can significantly enhance your organization’s security posture.

    At TekStream, we understand the critical role that MDR plays in modern cybersecurity strategies. That’s why we offer tailored MDR solutions that leverage the power of Splunk. We provide you with unparalleled visibility and round-the-clock protection for your digital assets.

    Ready to take your cybersecurity to the next level? Start your digital transformation today – schedule a security assessment with our MDR experts.

  • Lesser-known Splunk Enterprise features Part 1: Debug/Refresh

    Lesser-known Splunk Enterprise features Part 1: Debug/Refresh

    By Nate Hufnagel, Splunk Consultant II, Cybersecurity Engineering

    Intro

    The Splunk Enterprise platform supports several styling & behavior customizations that customers can take full advantage of. Some of these features are more obvious as your Splunk admin becomes more familiar with the UI, while others are not as obvious, even hidden. This two part series will discuss two of these hidden but powerful features of Splunk: debug/refresh and _bump.

    First up: debug/refresh. This feature can be used to reload all splunkd registered EAI (Extensible Administration Interface) handlers via REST call. Put more plainly – most of Splunk’s configs and static assets can be reloaded or refreshed without having to restart the splunkd service. This includes props, transforms, inputs, dashboards, and many others. The full list of endpoints can be found in the Splunk docs, or by executing debug/refresh. Let’s take a look at a few examples.

    In this first example, we’ll add a new search-time field extraction to props.conf and update our sourcetype without restarting Splunk. This is our list of fields before making any changes:

     A screenshot of a Splunk interface showing a pop-up window detailing the distribution of "ErrorMessage" field values, with a list of selected and interesting fields visible on the left pane.

    We’ll add another field called “ErrorMessage_2” to the sourcetype in props.conf. This can also be done through Splunk Web (Settings>Add Data)
    [<sourectype>]
    …
    EXTRACT-ErrorMessage_2 = ErrorMessage=(?<ErrorMessage_2>[^]]+)
    …

    Next, we’ll edit our Splunk Web URL to the following:
    http(s)://<host:mport>/debug/refresh
    …where “host” is the hostname and “mport” is the web port number (8000 in this case).
    Click “Refresh”, then it takes about a minute while all the endpoints reload.
    Once the reload is complete, we’ll see the “Entity refresh control page” in our browser, as well as a list of all endpoints that we’re successfully reloaded.

    A screenshot of a Splunk terminal showing the entity refresh control page, displaying the successful refreshing of Splunk configurations and EAI handlers.

    Now, we’ll navigate back to Splunk Web and run the same search as before: http(s)://<host>:<mport> (should still be logged in).

    A screenshot of the Splunk interface showing a detailed analysis pop-up window for the "ErrorMessage_2" field, displaying the top 10 values and their distribution.

    After running the same search, we see our new field!

    We can also reload more complex changes, like a custom app. For example, an app with a custom navigation bar and embedded HTML links can be installed and used without having to restart Splunkd!

    In this next example, our custom app is named “html-link”.  It contains on custom navigation tab called “Hyperlink” and an html link that can take us to an external site.  We’ll follow the same steps as above to achieve this without restarting Splunkd:

                  Install the app

                  Perform the debug/refresh

                  Navigate back to Splunk Web home

                  Launch app

    A screenshot of the Splunk Enterprise user interface showing the "Apps" dropdown menu open, listing various installed applications and options like "Search & Reporting" and "Manage Apps."

    Before installing the app

    A screenshot of a command line interface showing a tar command used to extract a file (html-blink_current.tgz) into the Splunk apps directory (/opt/splunk/etc/apps).

    Installing app

    A screenshot of the Splunk debug Entity refresh control page within a terminal, detailing the process for refreshing splunkd resources and EAI handlers.

    Performing debug/refresh

    A screenshot of the Splunk Enterprise interface displaying the Apps dropdown menu, which lists various applications, including a newly added "html-link" app, along with options to "Manage Apps" and "Search & Reporting".
    A screenshot of the Splunk Enterprise interface showing the "Hyperlink" tab active, with text instructing the user to click a link labeled "Debug-refresh-test-2" for learning more about regex.

    Navigating to/launching to app

    To learn more about what Splunk resources can be reloaded with debug/refresh, check out the link to the Splunk docs below. Be on the lookout for Part 2, where we’ll dive into the “_bump” feature.

    Link to Docs

    https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/CustomizationOptions

    https://dev.splunk.com/enterprise/docs/devtools/customrestendpoints/customresteai

    Let us know what you think! And for more information on TekStream offerings, visit our Splunk Services page.

  • ITSI Content Packs

    ITSI Content Packs

    By Tyler Phillips, Splunk Consultant

    Lately, I have been delving into Splunk’s premium app ITSI. Splunk IT Service Intelligence is a KPI monitoring addition to Splunk, where we can use predictive analytics to see incidents before they happen and see the status of services that keep your company running smoothly. My colleague and I were working with a client and used content packs to get them started with ITSI.

    ITSI uses metric data from all types of places and servers to show us how these servers are running and what could be going wrong at any time. There is an add-on for Linux that I will be using today to show what I am trying to do. We need to set up the add-on to pull in metric data and install the Splunk App for Content Packs to do this. Now we can get to the ITSI setup.

    Let’s start with the basic ITSI Linux service. I installed the add-on and brought in the metrics data. I then went into ITSI Service Templates and created a service called Linux using the “OS KPIs – *nix (SAI)” Service Template. Now let’s look at this in the Service Analyzer.

    A screenshot of the Splunk IT Service Intelligence (ITSI) Service Analyzer dashboard, displaying Key Performance Indicators (KPIs) and the health status of a Linux service.

    Notice how no fields are filled out other than packet drops. This is filled out with 0 because there is no data there. The default Linux service is receiving no data because it does not recognize the fields that are feeding it.

    Now, let’s add the content pack “Monitoring Unix and Linux” to be able to read this data. Go to the Configuration tab and select Data Integrations.

    A screenshot of the Splunk IT Service Intelligence (ITSI) interface showing the "Configuration" dropdown menu, with the "Data Integrations" option highlighted.

    From here we can select the Content Library tab and find the “Monitoring Unix and Linux” content pack and select it. Then click proceed to install the content pack.

    An icon for the Splunk IT Service Intelligence (ITSI) content pack for "Monitoring Unix and Linux," with a green checkmark in the corner.

    Once this is installed we can go back to the Service Templates page in the Configurations tab and see a new Service Template called “Unix and Linux server health”. Let’s create a service from this. Select the template and click the “New Service From Template”, then we can name the service. For my example, I named it “Linux – Content Pack”.

    To get the service running let’s add an entity. Go to the service and select the Entities tab.

    There will be an empty field in the two entity rules automatically set up. We need to add a host to search data for. I added my laptop to this to pull in its data. I’ll be showing the page without my laptop hostname.

    A screenshot of the Splunk IT Service Intelligence (ITSI) interface showing the "Entities" configuration page for the "Linux - Content Pack", including defined entity rules for filtering hosts and data sources.

    Once you have added your host click save and then continue to save and enable. Click that and boom! We should be good to go!

    Let’s check the service analyzer to see the data coming in.

    A screenshot of the Splunk IT Service Intelligence (ITSI) Service Analyzer dashboard, displaying the health score (82.5) and a list of Key Performance Indicators (KPIs) for the Linux Content Pack.

    I had to wait a few minutes for the searches to run so seeing no results at first is fine. Just give it some time. This data also shows up on the Infrastructure Overview tab automatically. Let’s check it out.

    A screenshot of the Splunk IT Service Intelligence (ITSI) "Infrastructure Overview" dashboard, displaying a grid of various IT entity types such as Unix/Linux, Kubernetes, and VMware.

    This process is how I got started on a client project and ultimately gave them the information they needed to monitor their business. Content packs are a great way to get started with ITSI and show immediate data before setting up the full service analyzer tree and any predictive analytics that make ITSI so great for companies! More information on the Splunk services we offer can be found on our Splunk Services page

  • Set Up Dynamic Prior Quarter Time Range Selection In Your Dashboards 

    Set Up Dynamic Prior Quarter Time Range Selection In Your Dashboards 

    By Marvin Martinez, Team Lead, Automation Engineering

    Splunk Time Range inputs allow for a plethora of selections to accommodate any time range one’s heart desires. But what about when you need quick access to prior quarters and don’t want to have to keep dealing with clicking into the “Relative” section and selecting 1, 2, 3, or even 4 quarters ago? Of course, you could also manually set the Date Ranges in the “Date Range” section but that takes time and who’s got that kind of time nowadays?!

    A screenshot of a data platform's time range selection interface in a dark theme, displaying options for relative time periods and specific date ranges.

    Instead, you could set up a drop down list that automatically calculates what the last four quarters are, with neat labels to identify them, and returns the time range for that quarter for any searches in your dashboard!

    A screenshot of a dropdown menu in a dashboard interface, showing dynamic time range options for specific prior quarters (e.g., 2023 - Q3, 2022 - Q4).

    The labels above are all dynamic and will always be the last 4 quarters based on what the current date is. Let’s explore how to set up this drop down and then how to ensure the appropriate start and end dates are set so that all your panels can use them. First, the populating search for the drop down. Use the following search as the populating search for your dropdown list:

    | makeresults count=4 
    
    | streamstats count 
    
    | eval current_time = now(), current_year = strftime(current_time,"%Y"), current_month 
    
    = strftime(current_time, "%m") 
    
    | eval month_start = (count - 1) * 3 + 1, current_year = IF(current_month &lt; 
    
    month_start+3,current_year-1,current_year), label = current_year . " - Q" . count 
    
    | eval time_start = strptime(month_start . "-01-" . current_year,"%m-%d-%Y"), time_end
    
    = relative_time(time_start,"+3mon@mon") 
    
    | eval time_start_human = strftime(time_start,"%m/%d/%Y %T") 
    
    | eval time_end_human = strftime(time_end,"%m/%d/%Y %T") 
    
    | sort - label 
    
    | table label time_start time_end time_start_human time_end_human 

    The search above calculates the last four quarters but, if you notice, that’s only limited by the count of the makeresults command at the top. Feel free to extend it and go back a bit further if you need to. The search creates 4 entries and numbers them using the streamstats command. Once numbered, it extracts some of the date information (year, month, etc.) and does a little math to calculate where in the year (i.e. quarter) it is currently. Based on that, it generates the start date for each row (i.e. quarter). Once configured, it just sorts them accordingly and returns the field with the start date of the quarter (more on this in a bit) as the value for the dropdown list item and the label for the dropdown list in the “label” field.

    So how do both the start AND end time ranges get set if only the start time is available as the value? Well, a little logic application is all it takes! Note that, in this dashboard, there was an option for a “custom” time range in which an actual time input is able to be selected to define any other custom time range desired as well. Feel free to reach out for more information on how to implement that, or keep your eyes out for a future blog on this topic! Enough teasing and back to setting the end time! Set up a change handler for your dropdown list as shown below:

          <change> 
    
            <condition match="$form.tok_time_range_select$!=&quot;custom&quot;"> 
    
              <unset token="tok_show_custom_time">true</unset> 
    
              <set token="tok_start_date">$tok_time_range_select$</set> 
    
              <eval token="tok_end_date">relative_time($tok_time_range_select$,"+94d@mon")
    </eval> 
    
            </condition> 
    
            <condition label="Custom"> 
    
              <set token="tok_show_custom_time">true</set> 
    
              <set token="tok_start_date">$form.tok_time_range.earliest$</set> 
    
              <set token="tok_end_date">$form.tok_time_range.latest$</set> 
    
            </condition> 
    
          </change> 

    The change handler checks to make sure the selected option isn’t “Custom” and does a few things:

    • It unsets the token to show the custom time range selector to ensure that gets hidden away
    • It sets the tok_start_date token which is what all the dashboard panel searches will be using as their start date.
    • It sets the tok_end_date token which is what all the dashboard panel searches will be using as their end date. Rather than just grabbing it from the value like the start date could, it needs to be quickly calculated via an eval. The eval simply does a relative time of the start date token and adds 94 days (to ensure even 3 months of 31 days wouldn’t prevent it from pegging the end date to the start of the 4th month!) and then pegs it to the beginning of the month.

    There you have it! Now, any panels in your dashboard (or better yet, your base search!) can just use the “tok_start_date” and “tok_end_date” tokens as their earliest/latest values and you can easily switch between quarters in your dashboard without having to worry about manually selecting x number of quarters ago or having to go in and define specific months!

    Read more about TekStream Splunk Services