Splunk Tesla Modular Input v1.3.6

IMPORTANT

The Python code in this App is dual 2.7/3 compatible. This version of the App enforces Python 3 for execution of the modular input script when running on Splunk 8+ in order to satisfy Splunkbase AppInspect requirements. If running this App on Splunk versions prior to 8 , then Python 2.7 will get executed.

Overview

This is a Splunk modular input add-on for polling your Tesla Vehicle data from the My Tesla API.

The following unofficial API reference was utilised : http://docs.timdorr.apiary.io/

Dependencies

Setup

Activation Key

You require an activation key to use this App. Visit http://www.baboonbones.com/#activation to obtain a non-expiring key

Authentication

Authentication is with your My Tesla credentials , plain text email and password, matching the owner's login information for https://my.teslamotors.com/user/login.

A client ID and secret are also required.

The current client ID and secret are available here : http://pastebin.com/fX6ejAHd

You can setup up your My Tesla username and password in each pre defined stanza via SplunkWeb.

Or you can edit SPLUNK_HOME/etc/apps/tesla_ta/default/inputs.conf directly and set the username and password in the parent tesla stanza so that all child stanzas inherit your username and password.

Data Source Types

By default the following data is requested and returned in JSON format :

There are default stanzas setup for each of these.

Aside from "Vehicle List" . all of the other stanzas take a vehicle id which you can set via SplunkWeb.

If you have more than 1 vehicle , you can clone the default stanzas and setup your other vehicle id(s).

Note : the "Vehicle ID" is actually the "ID" in the vehicle list... NOT the "vehicle_id". Ex: "{"response":[{"id":48.............25,"vehicle_id":14...26," the correct parameter is the FIRST number.

Encryption of credentials

If you require an encrypted credential in your configuration , then you can enter it on the setup page.

Then in your configration stanza refer to it in the format {encrypted:somekey}

Where somekey is any value you choose to enter on the setup page to refer to your credential.

Index

By default , data will go into the "main" index

Custom Response Handlers

You can provide your own custom Response Handler. This is a Python class that you should add to the SPLUNK_HOME/etc/apps/tesla_ta/bin/responsehandlers.py module.

You can then declare this class name and any parameters in the Tesla Input setup page.

Logging

Modular Input logs will get written to $SPLUNK_HOME/var/log/splunk/teslamodinput_app_modularinput.log

Setup logs will get written to $SPLUNK_HOME/var/log/splunk/teslamodinput_app_setuphandler.log

These logs are rotated daily with a backup limit of 5.

The Modular Input logging level can be specified in the input stanza you setup. The default level is INFO.

You can search for these log sources in the _internal index or browse to the Logs menu item on the App's navigation bar.

Troubleshooting

Support

BaboonBones.com offer commercial support for implementing and any questions pertaining to this App.