Tech bytes
Transmit weather stats from DHT22 using MQTT on micropython
In my previous article about DHT22 sensor, I had used arduino based programming to collect and transmit weather stats over MQTT. But that time I was wondering, how can I make it flexible by having WiFi, sensor and MQTT parameters configurable. Now, with micropython, I can prepare a simple json config file having all parameters […]
Publish IoT messages from micropython based client
Micropython is quite capable firmware to build prototypes and do experiments. Paired with ESP8266 micro controller board, it builds a perfect IoT client, which can be further interfaced with variety of sensors, motors, relays etc. Fundamental of IoT is data collection from sensors and connected IoT nodes. You can also establish machine to machine communication […]
micropython – an exciting firmware for microcontrollers
Arduino based controller boards have been all time favorite for developing prototypes and small projects.Arduino uses C++ style of coding. For many new starters it may not be the best programming language with start with. A promising alternate to Arduino is micropython firmware. This is available for variety of boards.In this article, I will cover […]
CSV logs ingestion to elasticsearch using Fluentd
You can push streaming CSV logs/data into Elasticsearch using Fluentd with very simple config. Consider following CSV data of Cars Make, Model, Year and Price. Now, to take it down into elasticsearch, prepare following config in fluentd td-agent.conf file Restart fluentd daemon and you will notice data in file starts going into elasticsearch. To visualize […]
High performance python based SNMP poller
In my last post, I wrote a basic SNMP poller using python easysnmp module. To make it more practical and industry ready I have further enriched it with following: Read SNMPv2 and SNMPv3 devices from CSV file. Based on the field count in device record use SNMPv2 or SNMPv3 module. Poll thousands of devices by […]
SNMP polling to get network interface statistics
This is very common used case in industry. Lets see how this can be implemented in python using easysnmp python module. This can be further extended to inject collected data into databases or CSVs. Here is the sample result of above program.
Ping and NMAP as REST API
I came across this idea while working on problem statement, where requirement was to run ping and nmap checks on devices and hosts from a jump server. Best way to offer nmap and ping check without getting users on jump server was to offer ping and nmap in some form of web service. To do […]
Python Dictionary – versatile data Structure
Python is really simple and powerful when you have to handle complex data objects. Dictionary is one of the popular data structures used in python. Just thought to put up quick code explaining what all you can do with a dictionary object in really simple way. Here is the output you get upon executing above […]
LDAP operations using Python
Normal command line LDAP tools such as ldapsearch, ldapadd, ldapmodify etc are handy when you are playing with standalone data. But if you want to do operations such as, taking user data from CSV in LDAP or get a neat formatted output for LDAP queries then python-ldap module is really what you need. Here is […]
SNMP polling using python
To play with SNMP using python install easysnmp python module. SNMP v2 Let us take a sample device Poll device using snmpwalk to get sysDescr value Python code to get same Save above code as pysnmpv2.py and execute SNMP v3 Lets take a sample device and its SNMP v3 parameters First using command line you […]