Check an SSL Certificate File in plain English
You need to verify that a file cert.pem contains the certificate you expected, to do this you can use this command to view the certificate in plain text with expiry date etc visible.
The ramblings of a computer geek
You need to verify that a file cert.pem contains the certificate you expected, to do this you can use this command to view the certificate in plain text with expiry date etc visible.
If you occasionally need to reboot a Linux box as a one off one evening you can perform the following commands using the at command. Note if you set a time that has just past it will perform the reboot the following day. So lets say its 16:15 and you want to schedule a reboot … Read more
This assumes you have a APC Smart-UPS UPS with a Network Management Card, that you have already configured to allow SNMP connections and you’ve configured the community string. This is tested using MRTG running on Ubuntu with an AP9619 network management card in the UPSes. This took ages to find the correct metrics OIDs from … Read more
Firstly you create an image of a disk using dd. Say in this example you have a second harddisk on your comuter called: /dev/sdb you want to make a dd image of it and then verify it is identical to the source disk. Step 1 Create the MD5 hash of the source disk as it … Read more
If you ever need to watch a log file to see if something goes into it, here is a cheeky command to do that. The -f says to watch for updates, the -n 500 shows how many lines to bring back.
We had an interesting one with Postfix, we were recieving mail fine from all other domains. Then one domain (in this case domain.co.uk) started not to get through, no changes had been made at our end. What was happening was that their domain.co.uk nameservers were not reporting TXT records properly, rather than reporting nothing or … Read more
Find and replace with VI on a pathname is a bit tricky you ned to use escape characters. In this case /bin/mail should be replaced with /usr/bin/mail The command below would do it:
With Nagios using check_icmp is the way to go, it better and faster, below is an example configuration directive for setting the check-host-alive command which will be used by each host check.
Here is an example of find and replace with VI, this will replace every instance of the “findthistext” string in the file with “replacewithtext”. Neat saves lots of typing!
This is what would be needed in your hosts configuration to monitor using check_icmp rather than check_ping. This makes the assumption its going to do two pings, otherwise turn “-p 2” into $ARG3$ instead!