Systemd-restarts-splunk-py

Systemd restarting A while ago I had a service that would need to be restarted after it had a cool down of about 2 hours… I had a stanza that stated Restart=always RestartSec=7200 which was cool because it would just autorestart when it died. At the time the restart would work just fine after the cooldown. The catch that I ran in to was because of that timer, if I logged in and tried to start it when it was in a failed state, the service would hang....

2018-11-09 · 2 min · 277 words · Mike Fettis

splunk-hec-python

Splunk HTTP collector python script Hey the http collector is awesome so let use it in python to send things to stuff… This is going to just take a dictionary as event data and then pass that to the http collector using only the request library . You will need to have a collector enabled for splunk and a token generated. #!/usr/bin/env python import time import requests import urllib3 ##turns off the warning that is generated below because using self signed ssl cert urllib3....

2018-10-25 · 2 min · 255 words · Mike Fettis

2017-03-06 git, splunk, lastpass-cli

git Git should know better and totally commit and add files that I was working on last night. I left an uncommited file sitting on a laptop at my house when I went to work today… Rookie mistake. for ALL the repos $ git config --global user.name "John Doe" $ git config --global user.email "john@doe.org" only for oen repo $ git config user.name "John Doe" $ git config user.email "john@doe.org" git aliases are cool add to your ....

2017-03-06 · 2 min · 233 words · Mike Fettis

2017-02-27 nginx, splunk, docker, git

Splunk and nginx Doing some splunkjs work from a docker container, and hosting it out of nginx, which means I needed to configure a proxy pass using some load balancing in order to access the splunk cluster, this was a little tricky because of session persistence and https. nginx load balancing Luckily there are some good pslunk blogs out there that help out configuring-nginx-with-splunk-rest-api-sdk-compatibility and some good reading about splunkjs read them both using-the-splunkjs-stack-part-1...

2017-02-27 · 1 min · 180 words · Mike Fettis