Skip to content

Instantly share code, notes, and snippets.

@lpla
lpla / MQTT-influxDB-telegraf-grafana-in-armv6-raspberry.md
Last active December 30, 2024 09:33
Install MQTT + influxDB + telegraf + grafana in Raspberry Pi 1 or Zero (armv6)

I tried to install this set of technologies for an small home project using BME280 in a Raspberry Pi Zero, but all guides I tried to follow are based on newer Raspberry Pi versions (armv7) (like this guide or this one), so the docker instructions don't work for some of these packages.

TL;DR: don't use any docker image as they don't exist for armv6, use only apt commands and repos from each project official documentation

Mosquitto (MQTT)

As official documentation details, simply use the already available package from Raspbian/Raspberry Pi OS archive repository:

@rawiriblundell
rawiriblundell / check_user_lastseen
Created September 13, 2020 00:13
checkmk local check for local account auditing
#!/bin/bash
# check_user_lastseen - report on users who have not logged in for a while
# Purpose:
# This script tries to find idle accounts and any orphaned homedirs
# Currently is Linux biased but capacity for portability is there
# Author: Rawiri Blundell
# Copyright: See provided LICENCE file
###############################################################################
# Source the config mapping library
# Provides variables "${thisHost}", "${thisJob}" and
@0x3333
0x3333 / output.md
Last active August 22, 2024 14:05
Show Memory and CPU usage of kvm vms
RAM
---
vm-1                      = 1,024 MiB
vm-2                      = 2,048 MiB

Total: 3,072 MiB

CPU(s)
------
@Aethylred
Aethylred / gist:0ea0d2899eca1da790aa078f9f2a885a
Last active October 24, 2024 11:26
freeipa-api-ansible-inventory
#!/usr/bin/env python
# This script uses the FreeIPA API to create an Ansible dynamic directory
# This is a shell script version of freeipa-api-inv.py
#
# DEPENDENCIES: before this script will work with AWX or Tower
# the python_freeipa module has to be installed
#
# Add this to your Docker image
# RUN pip install python_freeipa
#
#!/usr/bin/python
import sys, os
import urllib, urllib2
import base64
import json
import requests
import xml.etree.ElementTree as ET
def requests_xml(jss_user, jss_pass, jss_url, category):
#!/usr/local/bin/python3
"""
Custom inventory script for Ansible populated by the JSS
"""
from functools import lru_cache
from os.path import dirname, realpath, join
from urllib.parse import quote
import argparse
import json
@sheagcraig
sheagcraig / bring_the_payne.py
Created May 4, 2017 14:05
Get IP Address for all computers in the JSS
#!/usr/bin/env python
"""https://twitter.com/krispayne/status/859833552078225408:
@shea_craig is possible with python-jss to generate a list of IP addresses for
computers in the JSS?
"""
from operator import itemgetter
#!/usr/local/bin/python3
"""
Custom inventory script for Ansible populated by the JSS
"""
from os.path import dirname, realpath, join
from urllib.parse import quote
import argparse
import json
import configparser
@devynspencer
devynspencer / freeipa.py
Last active April 23, 2024 20:53
Use FreeIPA hostgroups as a dynamic inventory source for Ansible. Badass.
#!/usr/bin/env python
import argparse
import json
from ipalib import api
def initialize():
'''
This function initializes the FreeIPA/IPA API. This function requires
@devynspencer
devynspencer / freeipa.md
Created March 5, 2016 06:41
FreeIPA api notes
[devyn@ipa ~]$ ipa help commands
automember-add                         Add an automember rule.
automember-add-condition               Add conditions to an automember rule.
automember-default-group-remove        Remove default (fallback) group for all unmatched entries.
automember-default-group-set           Set default (fallback) group for all unmatched entries.
automember-default-group-show          Display information about the default (fallback) automember groups.
automember-del                         Delete an automember rule.
automember-find                        Search for automember rules.
automember-mod                         Modify an automember rule.