Git Product home page Git Product logo

azuremonitoraddonforsplunk's Introduction

Azure Monitor Add-on for Splunk

NOTES

This Splunk TA (add-on) is Open Source and not an officially support Microsoft product. Support is best effort. Members of the community (you) are encouraged to participate so that this popular TA can get the support its users richly deserve.

Splunk updated their Python requirement to v3.x a few months ago. This TA still takes a dependency on Python 2.7.

The repo is archived due to lack of resources to keep it up to date.

Overview

This add-on is built using Node.js and Python 2.7 and has been tested on Ubuntu 14.04, Windows 10 and RHEL 7.

It consumes Metrics, Resource Diagnostic Logs, and Tenant Diagnostic Logs (AAD Activity Log) and the Azure Activity Log according to the techniques defined by Azure Monitor, which provides highly granular and real-time monitoring data for Azure resources, and passes those selected by the user's configuration along to Splunk.

Here are a few resources if you want to learn more about Azure Monitor:

Installation and Configuration

This add-on requires an Azure Event Hub, Key Vault, Azure AD Service Principal and other configurations to properly integrate Splunk with Azure. Creating and configuring the Azure resources can be accomplished using one of the scripts available in the .\scripts folder as shown here:

MSI authentication

If you are planning to use MSI authentication instead of Service Principal (SPN), first ensure that you VM is up and running within your Azure subscription.

Azure configuration for Windows users

Requirements

  • Azure PowerShell, which you can download from here. The script was tested with version 5.7.0 of the Azure PowerShell cmdlets running on Windows Server 2016.
  • The following resource providers must be registered in your Azure subscription. You can find out which resouce providers are registered in your subscription using the command Get-AzureRmResourceProvider | Where-Object { $_.RegistrationState -eq "Registered" } | Select ProviderNamespace.
    • Microsoft.Authorization
    • Microsoft.EventHub
    • Microsoft.KeyVault
    • Microsoft.Storage
    • microsoft.insights

Configuration Steps

  1. Open .\scripts\azure-setup.ps1. Replace the variables at the top of the script with values from your environment.

    • $subscriptionId : Your Azure subscription Id.
    • $tenantId : The tenant / directory Id for your Azure subscription.
    • $splunkResourceGroupName : The name of the resource group to deploy the cluster into. This can be a new or existing resource group.
    • $splunkResourceGroupLocation : The location you want to deploy the cluster in. For example, eastus, westus, etc.

    An example showing the variables populated is shown here: sample script output

  2. Run the script. The script will prompt you to authenticate to your Azure subscription. The output for the script will look similar to the output shown here: sample script output

    Proceed to the section Splunk Enterprise configuration.

Azure configuration for Linux / Mac users

Requirements

  • Azure command-line interface (CLI), which you can download from here. The script was tested with version 2.0.42 of the Azure CLI running on Ubuntu 18.04 LTS.
  • The following resource providers must be registered in your Azure subscription. You can find out which resouce providers are registered in your subscription using the command az provider list --query '[?registrationState==`Registered`].namespace'.
    • Microsoft.Authorization
    • Microsoft.EventHub
    • Microsoft.KeyVault
    • Microsoft.Storage
    • microsoft.insights

Configuration Steps

  1. Open a terminal window and navigate to the .\scripts folder. The bash script requires four parameters as shown here:

    usage:  azure-setup.sh [options]
    options:
      -l <location>            : [Required] Location to provision resources in. Ex. westus, eastus, etc.
      -r <resource group name> : [Required] Resource group to deploy resources into.
      -s <subscription id>     : [Required] Azure subscription Id.
      -t <tenant id>           : [Required] Azure Active Directory / Tenant Id.
      -m <vm name>             : [Optional] VM name of VM that has MSI enabled. This will skip SPN setup and assign RBAC access for the VM.
  2. Run the script. The script will prompt you to authenticate to your Azure subscription. The output for the script will look similar to the output shown here: sample script output

    Proceed to the section Splunk Enterprise configuration.

Splunk Enterprise configuration

  1. Install the add-on in Splunk Enterprise using the latest package file from the github releases page.

    • In Splunk, open the apps manager page by clicking on the gear icon.

      Managing apps in Splunk

    • Click on the button labeled Install app from file.

    • In the dialog window, click the Browse... button and select the downloaded .spl file. Next, click the Upload button.

      Upload add-on to Splunk

    • After uploading the add-on app, the apps manager page should show the application installed in Splunk. An error message may also appear if the indicating the add-on could not initialize. This is typically because dependencies for Python and/or Node.js are not present.

      Initialize modular input error

    • To resolve the error message stating Splunk is "Unable to initialize modular input", install Node.js and Python on your Splunk Enterprise instance as described here. An example for an instance running on Ubuntu is shown below:

      • Run the following commands to install the Python and Node.js dependencies:

        # Elevate to root user
        sudo -i
        
        # Download script to setup Python dependencies
        curl -O https://raw.githubusercontent.com/Microsoft/AzureMonitorAddonForSplunk/master/packages/am_depends_ubuntu.sh
        
        # Set the execution attribute on the downloaded script
        chmod +x ./am_depends_ubuntu.sh
        
        # Run the script
        ./am_depends_ubuntu.sh
        
        # Download Node.js and it's dependencies
        curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
        
        # Install Node.js
        apt-get install nodejs
        
        # Install Nodel modules in the add-on's app folder.
        cd /opt/splunk/etc/apps/TA-Azure_Monitor/bin/app
        npm install
        
        # Return back to a non-root user
        exit
      • Go back to Splunk and click the Disable link for the add-on.

        Disable and Enable the add-on

      • Click the Enable link to re-enable the add-on. The add-on should be enabled now without any error messages appearing.

  2. Using the output from either the .\scripts\azure-setup.ps1 or .\scripts\azure-setup.sh above, configure the add-on's data inputs.

    • In Splunk, click on Settings -> Data Inputs at the top of the page.

    • For each of the add-on's data inputs, add a new configuration by copying and pasting the settings from the script's output into the data input's configuration.

      Azure Monitor Add-On Data Inputs

Support

If you have encountered difficulties with the add-on, the first thing to do is ensure that all Python and Nodejs dependencies are installed correctly according to the installation instructions in the wiki.

The Activity Log and Diagnostic Log data inputs use AMQP to connect to event hub over TLS using ports 5671 / 5672 as described in the AMQP 1.0 Service Bus and Event Hubs protocol guide. So, if you are having connection/authentication issues, check that these ports are open on your Splunk instance.

The Azure Monitor Metrics data input uses HTTPS to call into the Azure Monitor Metric API. As such, outbound traffic over port 443 needs to be enabled on the server.

If that doesn't help, the next thing to do is switch logging for ExecProcessor to Debug (Settings / Server Settings / Server Logging in Splunk Web) and recycle the add-on (disable/enable). Then search for 'azure_monitor' ERROR and DEBUG messages. There will be a lot of DEBUG messages. If you don't see anything helpful, open an issue in the repo.

Contributing

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Generating the Splunk package file

To test changes, you will need to generate a version specific package file that includes your changes, such as .\packages\TA-Azure_Monitor_1_2_7.spl. Follow the steps below to generate the version specific package file.

Note: The Windows script package.cmd requires 7-Zip to build the the file structure and contents. So, make sure you have this installed on your computer and that 7z can be run from a command/shell prompt. On Mac and Linux, package.sh will use tar if 7-zip is not installed.

  1. Open .\default\app.conf and bump the version property in the [launcher] section.

  2. This step generates the version specific package file. If you are running Windows, then you will use the .\deployment\package.cmd script. If you are running Mac or Linux, use the .\deployment\package.sh script. Open a command/shell prompt and change to the .\deployment directory. Execute the script, passing in the version specific string as shown below. Notice the use of underscores in the string.

    Windows

    package.cmd 1_2_7
    

    Mac or Linux

    ./package.sh 1_2_7
    

    The version specific package file will be in the .\packages folder, as shown below.

    Version specific package file

  3. The version specific package file should be committed to the repository with your code changes. It is tradition to remove the oldest version specific package file when creating a new one.

azuremonitoraddonforsplunk's People

Contributors

bczudek avatar ehershey avatar jasonconger avatar johnkemnetz avatar jsrobards avatar microsoftopensource avatar msftgits avatar sebastiankasprzak avatar sebastus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azuremonitoraddonforsplunk's Issues

version tag in app.conf

Hi,

Can you please change the version tag to "major.minor.Revision" format. Since Splunk Cloud Ops team validation failed when trying to validate

Check :
Check that the extracted Splunk App contains a default/app.conf file that contains an [id] or [launcher] stanza with a version property that is formatted as Major.Minor.Revision.

Message:
Splunk App packages must contain a default/app.conf file with an [id]or [launcher] stanza using theversionproperty formatted asMajor.Minor.Revision`.

Activity Logs captured but not Diagnostics and Metrics in Splunk

Hi all,
I was able to configure this app fairly quickly and get the modular data inputs working.
I created an input for Activity, Diagnostic and Metric log collection.
However, I am seeing data collected from eventhub for only activity logs, NOT diagnostic and Metrics.
In the internal logs I see no errors for diagnostic and metrics (.sh scripts are executing).

I would appreciate any help from the community in troubleshooting/debugging why diagnostics and metric logs are not captured.

EDIT: We are also writing eventhub data for the 3 categories to a storage account and we are seeing all the data reside in the storage container.

Thank you!

Unable to initialize modular input "azure_monitor_metrics

I saw no fix to this:

Running Ubuntu 17.10.
I get this error when running : npm install in /opt/splunk/etc/apps/TA-Azure_Monitor/bin/app:

npm WARN [email protected] No repository field.

And I get the famous error "Unable to initialize modular input "azure_monitor_metrics" defined inside the app "TA-Azure_Monitor": Introspecting scheme=azure_monitor_metrics: script running failed (exited with code 1)." from Splunk.

Azure Monitor metrics with dimensions or filters

I have tried setting up collection for some additional metrics, i.e. https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-supported-metrics#microsoftcontainerservicemanagedclusters

The issue I'm seeing is that the metrics that have defined dimensions are not collected properly, the dimension or filter information does not appear alongside the json payload in splunk and therefore those metrics are useless on their own.

Am I right in thinking that within current implementation of Azure Metrics script the concept of dimensions and filters is not supported or am I missing something?

ERROR Modular input Error

Hi Team,
We are receiving below errors with this add on in our environment:
ioctl(0, TCGETS, 0x7ffd6514efe0) = -1 ENOTTY (Inappropriate ioctl for device)
write(2, "ERROR Modular input Error: Recei"..., 85ERROR Modular input Error: Receiving input definitions prior to streaming timed out.

Kindly help us with this to get this resolved.

Regards,
BK

bin/app/logCategories.json not using resourceType to look up diagnostic logs sourcetype

function getAMDLsourcetype(category, resourceType) in bin/app/azure_monitor_logs.js sets the sourcetype by looking up the resourceType + category in bin/app/logCategories.json. resourceType is parsed from resourceID by the line -
var resourceType = getElement(resourceId, 'PROVIDERS/(?:.?/.?/)(.*?)(?:/|$)');

So for resourceId: /SUBSCRIPTIONS/A3B88F73-897A-45D9-BFFB-0572A0888656/RESOURCEGROUPS/DEV-DEMO/PROVIDERS/MICROSOFT.NETWORK/LOADBALANCERS/DEV-DEMO
and category: LoadBalancerProbeHealthStatus
we have resourceType + category = DEV-DEMO + LoadBalancerProbeHealthStatus
This does not match the -
"MICROSOFT.NETWORK/LOADBALANCERS/LOADBALANCERPROBEHEALTHSTATUS":"amdl:net:lb:probeHealth",

  • line in bin/app/logCategories.json.

Shouldn't bin/app/azure_monitor_logs.js parse the resourceType by using
var resourceType = getElement(resourceId, 'PROVIDERS/(.?/.?)(?:/)');
So for that for resourceId: /SUBSCRIPTIONS/A3B88F73-897A-45D9-BFFB-0572A0888656/RESOURCEGROUPS/DEV-DEMO/PROVIDERS/MICROSOFT.NETWORK/LOADBALANCERS/DEV-DEMO
and category: LoadBalancerProbeHealthStatus
we have resourceType + category = MICROSOFT.NETWORK/LOADBALANCERS + LoadBalancerProbeHealthStatus
Which matches the -
"MICROSOFT.NETWORK/LOADBALANCERS/LOADBALANCERPROBEHEALTHSTATUS":"amdl:net:lb:probeHealth",

  • line in bin/app/logCategories.json and sets te sourcteype to amdl:net:lb:probeHealth

Unable to pull messages from Event hubspace due to "AmqpProtocolError: amqp:unauthorized-access"

Hi
Getting the following exception on trying to read data from eventhubspace.

ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh" Modular input azure_diagnostic_logs://azure_keyvault_test ==> RX ERROR on hub: insights-logs-auditevent, err: AmqpProtocolError: amqp:unauthorized-access:An AMQP error occurred (condition='amqp:unauthorized-access'). TrackingId:28d35d664a764a00a8916e639f56388e_G20, SystemTracker:gateway5, Timestamp:9/26/2018 2:49:53 PM

Any help is much appreciated.

Regards
Anusha

Set-AzureRmKeyVaultAccessPolicy Error in when running azure-setup.ps1

I am currently working with a tenant/subscription sysadmin to set this up to send log data through event hub to Splunk. I was able to work through this with out issue in a pay-as-you-go subscription but working on this in an enterprise agreement tenant we are running into trouble getting the azure-setup.ps1 script to complete successfully. Can you review and possibly help identify what may be missing in the subscription/tenant that would be causing the script to not complete. Below is the error we are getting:

_\azure-setup.ps1
Creating resource group 'SiemPipeRG' in region 'Central US'.
Creating event hub namespace 'spleh################' in resource group 'SiemPipeRG'.
Creating Key Vault 'splkv################' in resource group 'SiemPipeRG'.

  • Setting default access policy for '[email protected]'
    Set-AzureRmKeyVaultAccessPolicy : Cannot find the Active Directory object '' in tenant
    'REDACTED'. Please make sure that the user or application service principal you are
    authorizing is registered in the current subscription's Azure Active directory. The TenantID displayed by the cmdlet
    'Get-AzureRmContext' is the current subscription's Azure Active directory.
    At C:\temp\azure-setup.ps1:33 char:1
  • Set-AzureRmKeyVaultAccessPolicy -ResourceGroupName $keyVault.Resource ...
  •   + CategoryInfo          : CloseError: (:) [Set-AzureRmKeyVaultAccessPolicy], ArgumentException
      + FullyQualifiedErrorId : Microsoft.Azure.Commands.KeyVault.SetAzureKeyVaultAccessPolicy_
    

Feature Request: Metrics collection for all resources in specific namespace

It would be useful to provide alternative method of collecting Azure Monitor metrics that does not require tagging of each individual resource.

My view of how the feature could work:

inputs.conf file:

[azure_monitor_metrics://crlab]
SPNTenantID = xxxxxxxxxxxxxxxxx
SPNApplicationId = ********
SPNApplicationKey = ********
SubscriptionId = xxxxxxxxxxxxxxxxxx
eventHubNamespace = ehxxxxxxxxxx
vaultName = kvxxxxxxxxxx
secretName = AzureMonitorMetric-secret
secretVersion = 84cxxxxxxxxxxxxxxxxxxxxxxx
index = main
interval = 60
sourcetype = amm:metrics
collectAllResources = {"MICROSOFT.COMPUTE/virtualMachines": "*", "Microsoft.Cache/redis": "connectedclients,cachehits,totalkeys,serverLoad,percentProcessorTime,totalcommandsprocessed,usedmemoryRss,usedmemory,evictedkeys,expiredkeys,getcommands,cacheRead,cacheWrite,cachemisses,setcommands"}

collectAllResources would behave as the "default policy" for metrics collection for given namespace, and individual resources can still be tagged to override the default value.

Sample scenarios with outcomes:

  • if namespace is not specified in collectAllResources dictionary, current behaviour applies

  • if namespace is specified in collectAllResources, collect metrics specified in the dictionary for all resources in given namespace

  • if namespace is specified in collectAllResources and resource is also tagged - use the value of the tag to determine which metrics are to be collected.

I'm keen to hear input from the maintainers of the project if they think this feature would be accepted before starting any development work on it.

Missing Input Options for Activity Log and Diagnostics

Perhaps there was something wrong with my install? (Also, I am running Splunk as not root, I performed all (Linux) installation steps as root but chowned the directory to the splunk user and restarted Splunk.)

The only Data Input option available is "Azure Monitor Metrics", but the one I want most to start with is "Azure Monitor Activity Log"

missing_inputs

Data is not forwarded from Azure to Splunk even after connection works fine

We are trying to forward Activity logs from Azure into Splunk.
We have setup both systems as per https://www.splunk.com/blog/2018/04/20/splunking-microsoft-azure-monitor-data-part-1-azure-setup.html and https://www.splunk.com/blog/2018/05/07/splunking-microsoft-azure-monitor-data-part-2-splunk-setup.html

There are no errors in connecting to Azure from Splunk but data is not forwarded. Also there are no logs so it's kind of mysterious that data is lost somewhere.
In Azure, we can see data in Event hub and also we can see that data can be forwarded (we tested by creating a function app as a consumer of event hub)

Feature Request: New Azure Monitor Alert Category

Is it possible to add the 'alert' category published by Microsoft.SecurityGraph into the logCategories.json and the corresponding event hub into the hubs.json.

There is this documentation provided by Microsoft.SecurityGraph team to enable 'alert' logs. It would be great to have that category already configured in the add on.

Thanks

EventHub data flow stopping after view minutes

In general this plugin is working properly, but unfortunately we have problems getting metric data from EventHubs (all other resources are working fine).
So it's not a general problem.

The EventHub is tagged with'Metrics: SuccessfulRequests, ServerErrors, UserErrors, QuotaExceededErrors, ThrottledRequests, IncomingRequests, IncomingMessages, OutgoingMessages, INREQS, SUCCREQ, FAILREQ, SVRBSY, INTERR, MISCERR, EHINMSGS, EHOUTMSGS, EHAMSGS'.

After tag is defined, the metrics are recorded/delivered for about 10 minutes. The data stream is interrupted without any error message. Server logging of the execProcessor is already set to'debug'.
Any tips I can get to the bottom of? Is it perhaps more due to Microsoft? But how can I analyze that?

When the day is updated, data is recorded again for about 10 minutes...

Enable Splunk sourcetype configuration for Activity Logs

The Diagnostic Logs data input is set up to allow the user to easily configure the Splunk sourcetype for each log category via the logCategories.json file in bin/app. Users want similar functionality for Activity Log messages as well. There are several major types of messages such as Administrative (crud operations against the subscription), Alert, Autoscale, and Service Health. The design isn't nailed down yet, so post your ideas here.

Unable to get Azure Activity Log, Azure Diagnostic Logs and Metrics

Hi, it has been detected problems when it comes to communicating azure with the splunk tool, I have already configured azure and splunk, but they fail to connect, it gives the several errors, for example:

  • ERROR ExecProcessor - message from 'python //$SPLUNK_HOME/TA-Azure_Monitor/bin/azure_monitor_metrics.py' Error caught in get_metrics_for_subscription, type: <class 'adal.adal_error.AdalError'>, value: Get Token request returned http error: 400 [Problem start date and time].

Has anybody solve this?.

Feature Request: MSI authentication

Hi,

I am interested in adding MSI authentication option to this Addon. This would allow splunk deployed on Azure VM's and with MSI enabled to not require any credentials at all.

Is this feature on the roadmap at the moment?

Sebastian

Errors getting to work on Heavy Forwarders

Hi,

I have the add-on working properly on a test HF running on Splunk 7.0.2 and RHEL 6.9. When attempting to get this working on a production HF running Splunk 6.6.4 and RHEL 6.9 we encountered a 401 password waterfall error (see below). Then, I installed the add-on to a SH in the production environment running on Splunk 7.0.4 and RHEL 7.4 (attempting to resolve a known issue with Splunk 6.6.4 and ciphers and the Application ID and Key were not masking in this HF.) The production search head was successful, we began receiving logs, and the Application ID and Key were masked. Thinking it could be a Splunk version issue we updated the version on the production HF Splunk 6.6.4 to Splunk 7.02, but still are not receiving logs and the ID and Key did not mask. I created a new HF running Splunk 7.0.2 and RHEL 6.9, in case there was a Splunk.secrets issue causing the error, but the Application ID and Key were still not masking and no logs coming in. I received a new error on this HF.

The 2 HF have 2 different errors:

First installation errors:
-ERROR ExecProcessor - message from "/opt/splunk_02/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://ActivityLog_TestHF Error 401 in the password waterfall: {1}
-ERROR ExecProcessor - message from "/opt/splunk_02/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://ActivityLog_TestHF Error getting secrets from storagePasswords: {"response":{"headers":{"date":"Wed, 20 Jun 2018 15:55:14 GMT","cache-control":"private","content-type":"application/json; charset=UTF-8","x-content-type-options":"nosniff","content-length":"71","vary":"Authorization","connection":"Close","x-frame-options":"SAMEORIGIN","server":"Splunkd"},"statusCode":401},"status":401,"data":{"messages":[{"type":"WARN","text":"call not properly authenticated"}]},"error":null}
-ERROR ExecProcessor - message from "/opt/splunk_02/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://ActivityLog_TestHF Error creating storage passwords: {"response":{"headers":{"date":"Wed, 20 Jun 2018 15:55:14 GMT","cache-control":"private","content-type":"application/json; charset=UTF-8","x-content-type-options":"nosniff","content-length":"71","vary":"Authorization","connection":"Close","x-frame-options":"SAMEORIGIN","server":"Splunkd"},"statusCode":401},"status":401,"data":{"messages":[{"type":"WARN","text":"call not properly authenticated"}]},"error":null}

Second installation errors:
-ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" at process._tickCallback (internal/process/next_tick.js:104:9)
-ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" at _combinedTickCallback (internal/process/next_tick.js:80:11)
-ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" at emitErrorNT (net.js:1277:8)

Any help on these errors would be very appreciated.
-Thanks

Unable to initialize modular input "azure_monitor_metrics" defined inside the app "TA-Azure_Monitor": Introspecting scheme=azure_monitor_metrics: script running failed (exited with code 1).

Querying the install instructions :
Suse env.

Splunk uses python 2.7 so why is there a dependency to install it again ?

Also with node.js

I get :

node -v
v6.9.1

but then :

/etc/apps/TA-Azure_Monitor/bin/app> npm install
If 'npm' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf npm
/etc/apps/TA-Azure_Monitor/bin/app> cnf npm

The program 'npm' can be found in following packages:

  • nodejs-common [ path: /usr/bin/npm, repository: zypp (SMT-http_smt-azure_susecloud_net:SLE-Module-Web-Scripting12-Updates) ]
  • npm4 [ path: /usr/bin/npm, repository: zypp (SMT-http_smt-azure_susecloud_net:SLE-Module-Web-Scripting12-Updates) ]
  • npm6 [ path: /usr/bin/npm, repository: zypp (SMT-http_smt-azure_susecloud_net:SLE-Module-Web-Scripting12-Updates) ]

Try installing with:
sudo zypper install <selected_package>

Error getting metrics

Hello,

I have the following error in my splunkd.log when I try to get metric logs (I'm using the TA 1.30)

ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_monitor_metrics.py" Error caught in get_metrics_for_subscription, type: <type 'exceptions.TypeError'>, value: string indices must be integers, locale = get_resources_for_rgs

thanks,
Fausto

TA-Azure_Monitor fails with AmqpProtocolError: amqp:unauthorized-access

TA-Azure_Monitor fails with AmqpProtocolError: amqp:unauthorized-access
08-17-2018 12:45:44.663 -0700 DEBUG ExecProcessor - message from "/opt/splunk/7.1.2/multirole/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh" Modular input azure_diagnostic_logs://Azure ==> RX ERROR on hub: szwus2-ehn-00001_01, err: AmqpProtocolError: amqp:unauthorized-access:An AMQP error occurred (condition='amqp:unauthorized-access'). TrackingId:6476670152ec49f29c32c94f251c045d_G23, SystemTracker:gateway5, Timestamp:8/17/2018 7:45:44 PM

08-17-2018 14:36:33.392 -0700 DEBUG ExecProcessor - message from "/opt/splunk/7.1.2/multirole/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh" Modular input azure_diagnostic_logs://Azure ==> RX ERROR on hub: szwus2-ehn-00001_01, err: AmqpProtocolError: com.microsoft:argument-out-of-range:The specified partition is invalid for an EventHub partition sender or receiver. It should be between 0 and 1.

We've verified Event hub and networking with test app running from private network, sample app pulls message as expected. No firewalls blocking amqp request.
https://github.com/Azure/azure-event-hubs/blob/master/samples/DotNet/Microsoft.Azure.EventHubs/SampleEphReceiver/readme.md

We've duplicated this on RHEL 7.2 and Windows 2012 server R2

Values not consistently returned

We are successfully collecting diagnostic logs, activity logs, and to an extent metric logs. We are on Splunk Enterprise 7.1.2, Redhat Linux, and 1.2.9 of the addon. As an example, we're collecting 'Disk Read Bytes' on our VM resources (verified tagging, we can see it in the json viewer, wget of the Azure API returns a value) and we will see events like the one below. Note that the only data is a timeStamp, there is no 'Value' for the Disk Read Bytes. This isn't an issue just for this metric, we see it across the board. Any ideas?

 amm_resourceGroup:	 BLAH01-RG	
 amm_resourceName:	 BLAH01-BLAH1	
 amm_resourceType:	 MICROSOFT.COMPUTE/VIRTUALMACHINES	
 amm_subscription_id:	 oursubid
 data:	{	[-]	
	 timeStamp:	 2018-09-19T14:18:00Z	
}	
 id:	 /subscriptions/oursubid/resourceGroups/BLAH01-RG/providers/Microsoft.Compute/virtualMachines/BLAH01-blah1/providers/Microsoft.Insights/metrics/Disk Read Bytes	
 name:	{	[-]	
	 localizedValue:	 Disk Read Bytes	
	 value:	 Disk Read Bytes	
}	
 type:	 Microsoft.Insights/metrics	
 unit:	 Bytes

Conflict with DB Connect App?

Hi

Installing the TA-Azure_Monitor on the same machine as the Splunk DB Connect App (3.1.3) causes a conflict. The DB Connect app throws this error:

<?xml version="1.0" encoding="UTF-8"?> <response> <messages> <msg type="WARN">Traceback (most recent call last): File "/opt/splunk/bin/rest_handler.py", line 79, in &lt;module&gt; print splunk.rest.dispatch(**params) File "/opt/splunk/lib/python2.7/site-packages/splunk/rest/__init__.py", line 149, in dispatch module = __import__('splunk.rest.external.%s' % parts[0], None, None, parts[0]) File "/opt/splunk/etc/apps/splunk_app_db_connect/bin/dbxproxy.py", line 7, in &lt;module&gt; from dbx_settings import Settings File "/opt/splunk/etc/apps/splunk_app_db_connect/bin/dbx_settings.py", line 10, in &lt;module&gt; import splunklib.client as client File "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/splunklib/__init__.py", line 18, in &lt;module&gt; from splunklib.six.moves import map ImportError: No module named six.moves </msg> </messages> </response>

I logged a support ticket with Splunk and got the following response:

I have tested another 3rd party app(TA-Proofpoint-TAP) which showed similar symptom and noticed that $APP_HOME/bin/splunklib folder caused the current symptom,

I have been able to make this work either by removing the app or by removing read/write permission from $APP_HOME/bin/splunklib folder(i.e chmod 000 $APP_HOME/bin/splunklib).

As TA-Azure_monitor app is not supported by Splunk, can you kindly contact developers for TA-Azure_monitor app and change $APP-HOME/bin/splunklib folder name for the app structure so that there is no naming conflict?

For now, I'm going to run TA-Azure_Monitor on a separate Splunk server, but am keen to know how to solve this properly.

Thanks,
Matt

Disambiguous Error Message: Wrong Value in KeyVault

This is an enhancement request. Our plugin was not working and we determined root cause was the wrong value within Key Vault. The only log message showing the issue was a DEBUG log statement wrapping an exception.

Enhancement request to properly display the below exception as an ERROR statement

06-18-2018 20:37:13.907 +0000 DEBUG ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://test1==> RX ERROR on hub: insights-operational-logs, err: AmqpProtocolError: amqp:unauthorized-access:Attempted to perform an unauthorized operation. TrackingId:46ea9189251842499fc41ecf958c039a_G17, SystemTracker:gateway5, Timestamp:6/18/2018 8:37:13 PM

Connecting to Splunk on-prem problems

We have accurate credentials in our input, as well as what we think is the correct Azure settings setup. I've setup an input for the Azure Monitor Activity Log, and am not getting any events into Splunk. We are seeing events in the EventHub related to Azure Monitor Activity. We're also not seeing any errors in the Splunk internal logs, even with debug turned on for ExecProcessor.
By the way, we're not behind a proxy per issue 33, though we are on prem.
Any help would be appreciated.

These are the events we're seeing in the internal Splunk log:

06-25-2018 17:15:28.926 -0400 DEBUG ExecProcessor - cmd='/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh' Not added to run queue

  | 06-25-2018 17:15:28.926 -0400 DEBUG ExecProcessor - PipelineSet 1: Destroying ExecedCommandPipe for "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" id=6218
  | 06-25-2018 17:15:28.926 -0400 DEBUG ExecProcessor - PipelineSet 1: Ran script: /opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh, took 6.460801 seconds to run, 0 bytes read 0 events read
  | 06-25-2018 17:15:28.916 -0400 DEBUG ExecProcessor - PipelineSet 1: Got EOF from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh", uniqueId=6218
  | 06-25-2018 17:15:28.906 -0400 DEBUG ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://aflazauditlog Five seconds of silence on all hubs, disconnecting.
  | 06-25-2018 17:15:23.906 -0400 DEBUG ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://aflazauditlog Time is now: 2018-06-25T21:15:23.906Z
  | 06-25-2018 17:15:23.895 -0400 DEBUG ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://aflazauditlog Checkpoint file name is: /opt/splunk/var/lib/splunk/modinputs/azure_activity_log/aflazauditlog_checkpoints.json
  | 06-25-2018 17:15:23.894 -0400 DEBUG ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://aflazauditlog Checkpoint file name is: /opt/splunk/var/lib/splunk/modinputs/azure_activity_log/aflazauditlog_checkpoints.json
  | 06-25-2018 17:15:23.894 -0400 DEBUG ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://aflazauditlog Checkpoint file name is: /opt/splunk/var/lib/splunk/modinputs/azure_activity_log/aflazauditlog_checkpoints.json
  | 06-25-2018 17:15:23.238 -0400 DEBUG ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://aflazauditlog single input = {"SPNApplicationId":"keyid","SPNApplicationKey":"key","SPNTenantID":"superlongstring","disabled":"0","eventHubNamespace":"name","host":"psnsplunk09u","index":"main","interval":"60","secretName":"SplunkApplication","secretVersion":"secretversion","sourcetype":"amal:activityLog","vaultName":"vaultname"}
  | 06-25-2018 17:15:23.238 -0400 DEBUG ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://aflazauditlog Streaming events from Azure Event Hubs until silence for 5 seconds.
06-25-2018 17:15:23.238 -0400 DEBUG ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://aflazauditlog single input = {"SPNApplicationId":"ID_NUM","SPNApplicationKey":"APPKEY","SPNTenantID":"TENID","disabled":"0","eventHubNamespace":"Dev-Az-Events","host":"psnsplunk09u","index":"main","interval":"60","secretName":"SplunkApplication","secretVersion":"SECVER","sourcetype":"amal:activityLog","vaultName":"KEYVAULT_name"}
06-25-2018 17:15:23.237 -0400 DEBUG ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://aflazauditlog password object: {"name":":AzureMonitorActivityLogAppKey:","service":{"scheme":"https","host":"localhost","port":8089,"username":null,"password":null,"sessionKey":"SessionKey","authorization":"Splunk","paths":{"apps":"/services/apps/local","capabilities":"authorization/capabilities","configurations":"configs","dataModels":"datamodel/model","deploymentClient":"deployment/client","deploymentServers":"deployment/server","deploymentServerClasses":"deployment/serverclass","deploymentTenants":"deployment/tenants","eventTypes":"saved/eventtypes","firedAlerts":"alerts/fired_alerts","indexes":"data/indexes","info":"/services/server/info","inputs":null,"jobs":"search/jobs","licenseGroups":"licenser/groups","licenseMessages":"licenser/messages","licensePools":"licenser/pools","licenseSlaves":"licenser/slaves","licenseStacks":"licenser/stacks","licenses":"licenser/licenses","loggers":"server/logger","login":"/services/auth/login","messages":"messages","passwords":"admin/passwords","parser":"search/parser","pivot":"datamodel/pivot","properties":"properties","roles":"authorization/roles","savedSearches":"saved/searches","settings":"server/settings","storagePasswords":"storage/passwords","users":"/services/authentication/users","typeahead":"search/typeahead","views":"data/ui/views","currentUser":"/services/authentication/current-context","submitEvent":"/services/receivers/simple"},"version":"default","timeout":0,"autologin":true,"http":{"version":"default","_cookieStore":{}},"prefix":"https://localhost:8089"},"qualifiedPath":"/servicesNS/nobody/TA-Azure_Monitor/storage/passwords/%3AAzureMonitorActivityLogAppKey%3A","namespace":{"owner":"splunk-system-user","app":"TA-Azure_Monitor","sharing":"app"},"_properties":{"clear_password":"cleared_pass","eai:acl":null,"encr_password":"enc_pass","password":"********","realm":"","username":"AzureMonitorActivityLogAppKey"},"_state":{"name":":AzureMonitorActivityLogAppKey:","id":"https://localhost:8089/servicesNS/nobody/TA-Azure_Monitor/storage/passwords/%3AAzureMonitorActivityLogAppKey%3A","updated":"1969-12-31T19:00:00-05:00","links":{"alternate":"/servicesNS/nobody/TA-Azure_Monitor/storage/passwords/%3AAzureMonitorActivityLogAppKey%3A","list":"/servicesNS/nobody/TA-Azure_Monitor/storage/passwords/%3AAzureMonitorActivityLogAppKey%3A","_reload":"/servicesNS/nobody/TA-Azure_Monitor/storage/passwords/%3AAzureMonitorActivityLogAppKey%3A/_reload","edit":"/servicesNS/nobody/TA-Azure_Monitor/storage/passwords/%3AAzureMonitorActivityLogAppKey%3A","remove":"/servicesNS/nobody/TA-Azure_Monitor/storage/passwords/%3AAzureMonitorActivityLogAppKey%3A"},"author":"splunk-system-user","acl":{"app":"TA-Azure_Monitor","can_change_perms":true,"can_list":true,"can_share_app":true,"can_share_global":true,"can_share_user":true,"can_write":true,"modifiable":true,"owner":"splunk-system-user","perms":null,"removable":true,"sharing":"app"},"content":{"clear_password":"somanypasswords","eai:acl":null,"encr_password":"enc_pass","password":"********","realm":"","username":"AzureMonitorActivityLogAppKey"}},"_fields":{},"_acl":{"app":"TA-Azure_Monitor","can_change_perms":true,"can_list":true,"can_share_app":true,"can_share_global":true,"can_share_user":true,"can_write":true,"modifiable":true,"owner":"splunk-system-user","perms":null,"removable":true,"sharing":"app"},"_links":{"alternate":"/servicesNS/nobody/TA-Azure_Monitor/storage/passwords/%3AAzureMonitorActivityLogAppKey%3A","list":"/servicesNS/nobody/TA-Azure_Monitor/storage/passwords/%3AAzureMonitorActivityLogAppKey%3A","_reload":"/servicesNS/nobody/TA-Azure_Monitor/storage/passwords/%3AAzureMonitorActivityLogAppKey%3A/_reload","edit":"/servicesNS/nobody/TA-Azure_Monitor/storage/passwords/%3AAzureMonitorActivityLogAppKey%3A","remove":"/servicesNS/nobody/TA-Azure_Monitor/storage/passwords/%3AAzureMonitorActivityLogAppKey%3A"},"_author":"splunk-system-user","_updated":"1969-12-31T19:00:00-05:00","_published":null}

Proxy support for adal-node

Getting econnreset. While trying to get event hub credentials assuming this could be something related to proxy issue.

I don't find any way to add proxy for adal.AuthenticationContext().

Unable to use proxy with the Addon

In the environment, access to Azure is only allowed via proxy. I have configured proxy settings in Splunk's server.conf, however, the addon is trying to contact directly to key-vault. Can you please elaborate on configuring proxy with the addon?

Exception when using data input for Diagnostics Logs

Hi,

I'm getting this exception. Any help is appreciated.

10-21-2017 19:29:59.173 +0000 DEBUG ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh" Modular input azure_diagnostic_logs://arprod-diagnosticlogs ==> RX ERROR on hub: insights-logs-networksecuritygroupevent, err: AmqpProtocolError: amqp:not-found:The messaging entity 'sb://arprod-eventhub-westus.servicebus.windows.net/insights-logs-networksecuritygroupevent/consumergroups/$default/partitions/1' could not be found. TrackingId:22cd7add6ef04d89bb47946f43e9adc2_G16, SystemTracker:gateway2, Timestamp:10/21/2017 7:30:00 PM
10-21-2017 19:30:00.062 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh" /opt/splunk/etc/apps/TA-Azure_Monitor/bin/app/node_modules/amqp10/lib/frames.js:64
10-21-2017 19:30:00.062 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh"   stream.write(buffer, callback);
10-21-2017 19:30:00.062 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh"         ^
10-21-2017 19:30:00.062 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh" TypeError: Cannot read property 'write' of null
10-21-2017 19:30:00.062 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh"     at Object.frames.writeFrame (/opt/splunk/etc/apps/TA-Azure_Monitor/bin/app/node_modules/amqp10/lib/frames.js:64:9)
10-21-2017 19:30:00.062 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh"     at Connection.sendFrame (/opt/splunk/etc/apps/TA-Azure_Monitor/bin/app/node_modules/amqp10/lib/connection.js:329:10)
10-21-2017 19:30:00.062 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh"     at ReceiverLink.Link.attach (/opt/splunk/etc/apps/TA-Azure_Monitor/bin/app/node_modules/amqp10/lib/link.js:152:27)
10-21-2017 19:30:00.062 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh"     at Timeout._onTimeout (/opt/splunk/etc/apps/TA-Azure_Monitor/bin/app/node_modules/amqp10/lib/link.js:270:12)
10-21-2017 19:30:00.062 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh"     at ontimeout (timers.js:365:14)
10-21-2017 19:30:00.062 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh"     at tryOnTimeout (timers.js:237:5)
10-21-2017 19:30:00.062 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh"     at Timer.listOnTimeout (timers.js:207:5)
10-21-2017 19:30:00.067 +0000 DEBUG ExecProcessor - PipelineSet 0: Got EOF from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh", uniqueId=8878
10-21-2017 19:30:00.077 +0000 DEBUG ExecProcessor - PipelineSet 0: Ran script: /opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh, took 3.595317 seconds to run, 0 bytes read 0 events read, exited with code 1

Thanks,
John

Errors after configuring azure_diagnostic_logs input

Working with a customer and are receiving the following error after configuring a new azure_diagnostic_logs input:

02-13-2018 14:26:45.056 -0800 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh"             Logger.error(name, String.format('Error {0} in the password waterfall: {1}', err.status, err.data.messages.text));
02-13-2018 14:26:45.056 -0800 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh"                                                                                                              ^
02-13-2018 14:26:45.056 -0800 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh" TypeError: Cannot read property 'messages' of undefined

Looking at the proxy logs from this customer, we do not see the heavy forwarder with this configuration attempting to contact Azure, so we believe the problem may something in the configuration, but are unsure where to look. Thanks!

Enable this add-on in Azure Gov Cloud

Azure Monitor is now available in the Azure Government Cloud data centers. A selector will be added to the data input configuration properties to allow the user to select which cloud they're running in.

Metrics Application Not Found in Directory

Currently have diagnostics and audit pulling data from Azure successfully. Using the same input settings for the metrics input gives the following error:
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_monitor_metrics.py" Error caught in get_metrics_for_subscription, type: <class 'adal.adal_error.AdalError'>, value: Get Token request returned http error: 400 and server response: {"error":"unauthorized_client","error_description":"AADSTS70001: Application with identifier 'RootManageSharedAccessKey' was not found in the directory

Need for Custom UI to select security mode

Some customers like the current security model that involves storing credentials in a Key Vault Secret. Some find it a burden compared to their needs. Splunk provides a mechanism to create a custom UI for inputing parameters for a Data Input. The add-on needs such a custom UI that would include a checkbox to switch on/off the use of the Key Vault. Do you have these skills and want to work on it? Here's the relevant page @ Splunk docs: https://docs.splunk.com/Documentation/Splunk/6.5.3/AdvancedDev/ModInputsCustomizeUI

Unable to get Azure Activity Log integration working

I just cannot get this working, I believe I have followed all the steps and have checked 2-3 times but getting following errors in the splunk log. Any pointers welcome to diagnose and fix this. It looks the similar error to others are experiencing.

04-22-2018 18:01:35.314 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" import splunklib.client as client
04-22-2018 18:01:35.314 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" ImportError: No module named splunklib.client
04-22-2018 18:01:35.502 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://mroystersubsciption Error getting event hub creds: StatusCodeError: 403 - {"error":{"code":"Forbidden","message":"Access denied","innererror":{"code":"AccessDenied"}}}
04-22-2018 18:02:35.308 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" File "mask_secret.py", line 31, in
04-22-2018 18:02:35.309 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" import splunklib.client as client
04-22-2018 18:02:35.309 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" ImportError: No module named splunklib.client
04-22-2018 18:02:35.584 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://mroystersubsciption Error getting event hub creds: StatusCodeError: 403 - {"error":{"code":"Forbidden","message":"Access denied","innererror":{"code":"AccessDenied"}}}
04-22-2018 18:03:35.354 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" File "mask_secret.py", line 31, in
04-22-2018 18:03:35.354 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" import splunklib.client as client
04-22-2018 18:03:35.354 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" ImportError: No module named splunklib.client
04-22-2018 18:03:35.613 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://mroystersubsciption Error getting event hub creds: StatusCodeError: 403 - {"error":{"code":"Forbidden","message":"Access denied","innererror":{"code":"AccessDenied"}}}

Sourcetype naming convention

Any chance that you might reconsider the sourcetype names?

Generally the rule of thumb is to use vendor:product and something that's descriptive. I think that the use of amal:activityLog isn't particularly obvious as to what it is (or at least it wasn't to me). The use of a capital is also not something I've seen done and appending the word "Log" to the end of the sourcetype name is probably superfluous in any case (everything in Splunk is a log).

What do you think of these instead?

  • ms:azure:diag
  • ms:azure:activity
  • ms:azure:metrics

This aligns with the sourcetypes used in the Azure AD Splunk TA (ms:aad:signin and ms:aad:audit) and the two O365 TAs that are available on splunkbase (ms:o365:management and ms:o365:reporting:messagetrace).

Also, thanks very much for the work done to create this TA. Getting good logging out of Azure has been pretty confusing but I feel like the Monitoring Service (plus EventHubs to export) is the direction things are going and I look forward to seeing this TA progress to the point that it's easy to set up and use.

Type casting error with configured Metrics collection

Hi everyone, I am getting the following error from Splunk with the installed Azure Monitor add-on:
09-17-2018 08:40:53.567 +0000 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_monitor_metrics.py" Error caught in get_metrics_for_subscription, type: <type 'exceptions.TypeError'>, value: string indices must be integers, not str, locale = get_resources_for_rgs
host = splunk-heavy-forwarder

I have configured everything correctly and have double checked all inputs. What other information should I provide in order to help with the debugging process?

Thanks,
James

scripts/azure-setup.sh does not work on MacOS due to bash version

Receiving following error on MacOS High Sierra v10.13.5:

➜ scripts git:(master) ✗ ./azure-setup.sh -l northeurope -r seb_test -s xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -t xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxd72b To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code DU8KXXXXX to authenticate. User '[email protected]' successfully authenticated. [...] Adding secrets to key vault 'kv1529300000'. ./azure-setup.sh: line 138: EVENTHUB_SECRET_VERSION: bad array subscript

bash version:
➜ scripts git:(master) ✗ bash --version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17) Copyright (C) 2007 Free Software Foundation, Inc.

Looking through internet resources it is my understanding that Apple will not be upgrading bash to v4 due to GPLv3 license.

The issue is with the way the last item of the array is accessed.

i.e. line 138 currently:

EVENTHUB_SECRET_VERSION=${EVENTHUB_SECRET_VERSION[-1]}

which is incompatible with default version of bash in Mac OS.

changing this line to

EVENTHUB_SECRET_VERSION=${EVENTHUB_SECRET_VERSION[${#EVENTHUB_SECRET_VERSION[@]}-1]}

will make this script backwards compatible with bash versions < 4.0

This change will be required in couple of places within the bash script.

Error getting secrets from storagePasswords: {"status":404}

Hi Folks

I had the Addon working perfectly for about 36 hours before it suddenly stopped pulling events with the above error. Everything on the Azure side appears as it should be, credentials used have been verified by using another application to access the Azure EventHub.

full error - ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh" Modular input azure_diagnostic_logs://TEST Error getting secrets from storagePasswords: {"status":404}

Many thanks

Miles

Error Getting EventHubs

Hi Team,

We are getting below error:
/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh" Modular input azure_diagnostic_logs://AzureDiagnosticLogDetails Error getting event hub creds: Error: getaddrinfo ENOTFOUND login.microsoftonline.com login.microsoftonline.com:443

Is this related to credentials or network?

Regards,
BK

Unable to get Azure Activity Log and Azure Diagnostic Logs

I spin up a Splunk Enterprise in Azure and followed the steps (Azure configuration and Splunk configuration) but I'm unable to get Azure Activity Log and Azure Diagnostic Logs.

seeing the following errors in splunkd logs,

4/20/18
7:59:16.210 PM
04-20-2018 19:59:16.210 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh" ImportError: No module named splunklib.client
host = standalone-vm source = /opt/splunk/var/log/splunk/splunkd.log sourcetype = splunkd
4/20/18
7:59:16.210 PM
04-20-2018 19:59:16.210 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh" import splunklib.client as client
host = standalone-vm source = /opt/splunk/var/log/splunk/splunkd.log sourcetype = splunkd
4/20/18
7:59:16.210 PM
04-20-2018 19:59:16.210 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_diagnostic_logs.sh" File "mask_secret.py", line 31, in
host = standalone-vm source = /opt/splunk/var/log/splunk/splunkd.log sourcetype = splunkd
4/20/18
7:59:14.252 PM
04-20-2018 19:59:14.252 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" ImportError: No module named splunklib.client
host = standalone-vm source = /opt/splunk/var/log/splunk/splunkd.log sourcetype = splunkd
4/20/18
7:59:14.252 PM
04-20-2018 19:59:14.252 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" import splunklib.client as client
host = standalone-vm source = /opt/splunk/var/log/splunk/splunkd.log sourcetype = splunkd
4/20/18
7:59:14.252 PM
04-20-2018 19:59:14.252 +0000 ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" File "mask_secret.py", line 31, in

Some clarification needed on the dependencies.

Hi,

Just wondering if it's still necessary to install the python and node.js dependencies manually? I've installed the most recent versioned .spl file and the app looks to be functioning okay now (before I've tried to ingest any data). Will I run into errors when trying to ingest data if the dependencies have not been installed manually? Or is this now something that's done automatically with install of the app?

Cheers,

Robbie

AppID and AppKey overwritten when adding multiple subscriptions

As discussed with @rickrain over the phone, the SPN AppID and AppKey is overwritten every time a new subscription is added. Those two fields are obfuscated in JS according to Rick and don't handle multiple input stanzas.
Consider using Splunk's built in password store. This is a great read and should point you guys in the right direction: http://www.georgestarcher.com/splunk-stored-encrypted-credentials/ . Also
a blog entry from Splunk

Misc. event hub

Can the add on be used to monitor other type of event hub ? Or will it just work for Activity logs inside an event hub ?

I seem to have setup correctly the addon but it doesn't grab logs that I store inside an event hub, I was wondering if that's because it is built in a way that only watches for Activity/Diagnostic logs in an event hub.

Is there a way to enable debug so I can see if that is the issue ?

Thanks

Problem with Azure Metrics

Hello,
we have a problem with the Metrics input of your Azure Addon for Splunk. For example, we access Redis data from our system in particular "connectedclients". For these, we repeatedly receive "total" data, although this should not exist according to the Azure specification (https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-supported-metrics#microsoftcacheredis). But again and again we don't get the actual maximum value. Do you have any idea what the problem is here?

What is needed for the Secret

I am confused regarding the secret - what is expected here?

Is is a SAS token? A connection string? Some other format?

Thanks

Self Signed certificate in certificate chain

Hello,

I have followed the steps in github and setup everything correctly, however i still get self signed certificate error.

ERROR ExecProcessor - message from "/opt/splunk/etc/apps/TA-Azure_Monitor/bin/azure_activity_log.sh" Modular input azure_activity_log://Azure Activity Log Moni
tor Error getting event hub creds: Error: self signed certificate in certificate chain

In addition to that i have added servicebus,microsoft certificates in cacerts and restarted splunk server. Still no luck

Your help will be greatly appreciated.

Thanks in advance.
Karthik

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.