wget and then clean up links in php website

I am helping a friend set up a wordpress website. She found a website that she like the structure and look of. I wanted to capture the site including links and each individual page as a reference for what she likes and how to build the site for her. I won’t copy it, but I…

Continue Reading

vi(m) tricks

I had copied a section of text from a pdf. When I pasted it into an email I got: insurance against loss or damage by fire, including an extended coverage endorsement, for all buildings and personal property which comprise the Property. Owner agrees to maintain property liability insurance in full force and effect during the…

Continue Reading

updating iLO, HP’s Integrated Lights Out Connection

I was handed an HP server to rebuild. The server had rebooted for no logged reason. Two other servers bought at the same time and built with the same OS and firmware had also experienced this spontaneous reboot. These had been rebuilt and the rebuild at updated firmware and updated Ubuntu version had resolved the…

Continue Reading

monitor mongodb from nagios

I was asked to find a way to alert if the PRIMARY server in our mongodb replicaset changed… I found check_mongodb.py from the mongodb documentation and google search. Grab the check_mongodb.py file from https://github.com/mzupan/nagios-plugin-mongodb. Also here are the install instructions and the nagios configurations. I installed the check_mongodb.py file and tried it: ./check_mongodb.py No module…

Continue Reading

finding mongodb primary server

I found a monitor for when the PRIMARY of a mongodb replica set changes – but how to determine which server actually is primary? Well, this can be done on the command line… root@server:/opt/mongodb/bin# ./mongo 192.168.1.1 –eval “printjson(rs.status())” MongoDB shell version: 2.0.4 connecting to: 192.168.108.161/test { “set” : “px_mongo”, “date” : ISODate(“2013-04-01T21:13:56Z”), “myState” : 2,…

Continue Reading