An open API service indexing awesome lists of open source software.

https://github.com/martincastroalvarez/python-splunk-cli

Python integration with Splunk.
https://github.com/martincastroalvarez/python-splunk-cli

cli python3 splunk

Last synced: about 1 year ago
JSON representation

Python integration with Splunk.

Awesome Lists containing this project

README

          

# Topaz
*Splunk CLI*

![alt text](./topaz.jpg)

## Installation
```
git clone ssh://git@github.com/MartinCastroAlvarez/topaz
cd topaz
virtualenv -p python3 env
source env/bin/activate
pip install -r requirements.txt
```

## Configuration
Put the following content in *$HOME/.topaz*
```
{
"my_company": {
"account": "my_company",
"username": "###########",
"password": "####"
}
}
```

## Usage

#### Search Splunk alerts in the last 15 minutes.
```
python3 topaz.py --index sandbox --search seagull --start 15m
```
```
901:80''>

Start monitoring Consul & Python...'>
Starting python app: seagull...'>
Start consul-template in daemon mode...'>
Running consul-template once...'>
CONSUL_IP is 10.0.12.123'>
CONSUL_IP not set, looking for AWS instance IP'>
Checking for CONSUL_IP environment variable'>
Starting start.sh of base-pyservice...'>

```

### Search for startup errors.
```
python3 topaz.py --index sandbox --search startup --start 15m
```

### Filter messages by log level.
```
python3 topaz.py --index sandbox --search startup --start 15m --level ERROR,WARNING
```