Tag Archive - debian

Quick Install and Configure Puppet with Modules

Puppet install is pretty straightforward

this article is based on these versions

puppet-2.6.6-3.fc15.noarch
puppet-server-2.6.6-3.fc15.noarch

on the master server install puppet-server

1
yum install puppet-server

and on the clients
Continue Reading…

 

fixing a broken rrd cacti graph

Recently i ran into a problem while graphing the total number of pages being printed every day on xerox 7765 workcentre printer, snmpwalk worked fine and gave the correct result, but cacti rrd did not display any data.

1
2
snmpwalk -v 1 -c 'communitystring' printer SNMPv2-SMI::mib-2.43.10.2.1.4.1.1
107212

I increased the maximum value on cacti but it did not take any effect so i had to edit the rra file directly using rrdtool and increase the maximum snmp oid

1
2
3
4
5
6
7
8
9
10
11
12
13
14
cd /var/www/cacti/rra
rrdtool info printer_snmp_oid_241.rrd
........
..............
ds[snmp_oid].index = 0
ds[snmp_oid].type = "GAUGE"
ds[snmp_oid].minimal_heartbeat = 600
ds[snmp_oid].min = 0.0000000000e+00
ds[snmp_oid].max = 1.0000000000e+03
ds[snmp_oid].last_ds = "107211"
ds[snmp_oid].value = 5.3605500000e+05
ds[snmp_oid].unknown_sec = 0
................
........

Continue Reading…

 

secure centralized log server

log archive script

#!/bin/sh

Today=`date +%Y%m%d`
fy=`date –date=’5 days ago’ +%Y`
fm=`date –date=’5 days ago’ +%m`
fd=`date –date=’5 days ago’ +%d`

echo “$Today”;
echo “$fd”;

server=`ls /var/log/HOSTS`;

for i in $server
do

mkdir -p /archive/$i/$fy/$fm/$fd
tar -zcvf /archive/$i/$fy/$fm/$fd/$fd.tar.gz /var/log/HOSTS/$i/$fy/$fm/$fd/

done

#!/bin/sh

Today=`date +%Y%m%d`
fy=`date –date=’5 days ago’ +%Y`
fm=`date –date=’5 days ago’ +%m`
fd=`date –date=’5 days ago’ +%d`

echo “$Today”;
echo “$fd”;

server=`ls /var/log/HOSTS`;

for i in $server
do

mkdir -p /archive/$i/$fy/$fm/$fd
tar -zcvf /archive/$i/$fy/$fm/$fd/$fd.tar.gz /var/log/HOSTS/$i/$fy/$fm/$fd/

done

 

apt-get error: W: There is no public key available for the following key IDs: 9AA38DCD55BE302B

solution:

gpg –keyserver wwwkeys.eu.pgp.net –recv-keys 9AA38DCD55BE302B
apt-key add .gnupg/pubring.gpg

apt-get update

W: There is no public key available for the following key IDs:
9AA38DCD55BE302B
 

svn dump repository and restore

cd <repository parent dir>
svnadmin dump <repository> –deltas  > dumpfile
mv <repository>  <repository>.old
svnadmin create <repository>
svnadmin load <repository> < dumpfile
rm dumpfile

Continue Reading…

 
Page 1 of 11
Theme Tweaker by Unreal