Machine learning using decision tree algorithm in python
Decision tree algorithm is very basic method to predict result of given input using the pre-known data (knowledge) . Let us see how this can be used in machine learning to do predictions. To start with, you need python scikit-learn module Think of a problem statement…say predicting a domestic animal with its height, length and […]
ACS712 current sensor with NodeMCU
When we buy an electrical appliance we trust that the load mentioned on specs is correct. Let us try to build something to measure actual power usage of a 220V AC electrical appliance. ACS712 is available is 5A, 20A and 30A current rating. This sensor works on the principal of Hall effect. From the data […]
python based nmap port scanning
Nmap is a great tool to run scans on remote hosts and networks. python-nmap module uses underline nmap binary to run scans and adds advantage of programmable controls to get desired results. To start install python-nmap module. Here is a sample code how to use above module and run scans. Save this as scanit.py Output
Paramiko python ssh library
At times we have to use ssh connections to remote hosts/devices in programs to perform certain tasks. Here is an example that you can pick and modify to your taste.
Migrate elasticsearch data from one cluster to another
Suppose you have an existing elasticsearch cluster A and, for any reason, you want to migrate the data to cluster B.In this write up, My cluster A is on ELK 5.4 and cluster B is on ELK 6.7. This procedure is very handy to upgrade and migrate ELK on from existing to new servers. On […]
Playing with elasticsearch indices
List all indices List indices matching a pattern Delete an index Fetch available fields in an index Search something within an index List all items in an index
Syslog messages in EFK stack
You can use opensource syslog-ng tool to capture syslog messages from various sources, like remote servers, devices, local logs and so on. These logs can then be forwarded to fuentd on EFK stack. Here is a sample config of syslog-ng config to receive logs from devices and hosts on tcp and udp port 514. Received […]