Category Archives: SCRIPTING

pexpect alternative in python for remote connection

We generally use python pexpect module to connect system remotely with ssh and execute our tasks. But sometimes pexpect module is not found to be installed in remote systems which create problems. And this problem can be solved with the … Continue reading

Posted in ARTICLES, OperatingSystem, Operations, Programming, SCRIPTING | Tagged , , | Leave a comment

SNMP Poller tool to monitor any thing on network

Few years ago, I had created one SNMP Poller tool using perl and snmp utilites that can poll OID informations from any network devices, which is kind of passive monitoring mechanism. Thought to make it Opensource under GNU GPL. The … Continue reading

Posted in ARTICLES, FOSS, Monitoring, Programming, SCRIPTING | Tagged , , , , , | Leave a comment

Python : Inplace update json and maintain proper order

Some time we have to read one existing json property file and  update some values inplace. If we don’t use proper approach, the update may lead to breaking the json structure in the file. We have to hook the json … Continue reading

Posted in ARTICLES, DevOps, Programming, SCRIPTING, TIPS & T RICS | Tagged , , , | Leave a comment

Send mail using Python’s smtplib module

Python has a built in module to send mail to recipient[s] as to,cc,bcc. Here assumption is that : the smtp is configured in localhost (where the script will run).      

Posted in ARTICLES, DevOps, HOWTO, Programming, SCRIPTING, TIPS & T RICS | Tagged , , , | Leave a comment

Chef – Create encrypted data bag and keep secrets

Sometimes we have to deal with global variables like User passwords, database password, API Keys, middleware boot properties in our chef recipes which shouldn’t be exposed outside. One solution is we have to keep all the secrets in a data … Continue reading

Posted in ARTICLES, DevOps, HOWTO, OperatingSystem, Programming, SCRIPTING | Tagged , , , , | 1 Comment

Writing chef Library

In many cases we have to reuse same code again and again in our recipes. So to reduce this we can write our own library module and reuse it’s methods whenever required. This can help us use our own custom … Continue reading

Posted in ARTICLES, DevOps, HOWTO, Programming, SCRIPTING, TIPS & T RICS, TUTORIALS | Tagged , , , , , , | Leave a comment

Change tab width in vim

By default, inside vim the tab width is 8 spaces, we can reduce it using below steps. Create a .vimrc file in ~(home dir) and add below content.  Save it and now try. filetype plugin indent on ” show existing … Continue reading

Posted in SCRIPTING, TIPS & T RICS, Uncategorized | Tagged , , | Leave a comment