Showing posts with label Debian. Show all posts
Showing posts with label Debian. Show all posts

Monday, February 8, 2010

SNMP on grml/debian

I've been adding some additional servers into my Zenoss system. As most of my Linux boxes are running CentOS Linux, adding them in is no problem.

But I have one grml system. Why different? I had downloaded an appliance from the vmware community site. I needed a bugzilla system - there was one ready built - it seemed like a good idea at the time!

So,...
I had checked that snmp was installed on the system.
I had edited the /etc/snmp/snmpd.conf file to include the settings I wanted.
I had started the snmpd service.

But I couldn't perform an snmpwalk from my zenoss server and couldn't add it as a device into Zenoss!

Some digging with netstat revealed that port 161 was only listening for the localhost/127.0.0.1! Which was confusing because I wasn't configuring it to be like that.

Where was it picking that up from?

A quick google, quickly found these two sites, HowToForge & DebianWiki with essentially the same information.

There are some default setting in /etc/default/snmpd including the value of the environment variable SNMPDOPTS.
Out of the box, it is set to
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'
which I chenged to
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'

I restarted the snmpd service and checked the result from netstat -an
Huzzah!

I checked the snmpwalk and saw screeds of stuff fly up my console. And lastly, I successfully added the box into zenoss.

And that's that!

Monday, January 12, 2009

Modifying the Keyboard on Debian Linux

So I've downloaded the SyslogAppliance v0.0.4 to act as a Syslog Server in the company's DMZ. I ran the appliance initially in VM Player and then used the Enterprise Converter to import the appliance into a Virtual Machine on our VMwareESX server.

By default, the appliance is set up for a US audience with US keyboards. That's not a problem. After 20+ years in IT, you expect that and I know my way around a US keyboard, especially as I work for an American concern. Anyway, the ReadMe.txt file that's packaged with the appliance provides you with information on how to configure a UK keyboard.
...
VMWare Settings
- 256 MB memory (you should increase this for large log volumes)
- 64GB virtual disk
- listening on port 514/UDP and port 514/tcp
- US keyboard, to install a different local, do
$ apt-get install console-setup
$ dpkg-reconfigure console-setup
...

Obviously, despite both being Linux, it uses a different mechanism from that used by rPath in an earlier post on this blog. But two command lines isn't too painful.

appliance:/etc# apt-get install console-setup
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package console-setup
appliance:/etc#

Oh. That's unfortunate! Maybe this won't be so easy.

15 minutes of googling around apt-get and reading the more obvious looking results.

appliance:/etc# apt-get update
Get:1 http://security.debian.org lenny/updates Release.gpg [189B]
Ign http://security.debian.org lenny/updates/main Translation-en_US
Get:2 http://ftp.us.debian.org lenny Release.gpg [189B]
Get:3 http://security.debian.org lenny/updates Release [40.8kB]
Ign http://ftp.us.debian.org lenny/main Translation-en_US
Get:4 http://ftp.us.debian.org lenny Release [74.5kB]
Ign http://security.debian.org lenny/updates/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Sources/DiffIndex
Get:5 http://security.debian.org lenny/updates/main Packages [18.1kB]
Get:6 http://security.debian.org lenny/updates/main Source [5175B]
Get:7 http://ftp.us.debian.org lenny/main Packages [6942kB]
Get:8 http://ftp.us.debian.org lenny/main Source [2982kB]
Fetched 10.1MB in 23s (423kB/s)
Reading package lists... Done
appliance:/etc#
appliance:/etc# apt-get install console-setup
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
console-terminus xkb-data
The following NEW packages will be installed:
console-setup console-terminus xkb-data
0 upgraded, 3newly installed, 0 to remove and 70 not upgraded.
Need to get 1539kB of archives.
After this operation, 5968kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://ftp.us.debian.org lenny/main console-terminus 4.26-2.1 [420kB]
Get:2 http://ftp.us.debian.org lenny/main xkb-data 1.3-2 [645kB]
Get:3 http://ftp.us.debian.org lenny/main console-setup 1.28 [474kB]
Fetched 1539kB in 5s (264kB/s)
Preconfiguring packages ...
Selecting previously deselected package console-terminus.
(Reading database ... 18500 files and directories currently installed.)
Unpacking console-terminus (from .../console-terminus_4.26-2.1_all.deb) ...
Selecting previously deselected package xkb-data.
Unpacking xkb-data (from .../xkb-data_1.3-2_all.deb) ...
Selecting previously deselected package console_setup.
Unpacking console-setup (from .../console-setup_1.28_all.deb) ...
Setting up console-terminus (4.26-2.1) ...
Setting up xkb-data (1.3-2) ...
Setting up console-setup (1.28) ...
appliance:/etc#

Despite the quantity of output, it didn't take more than 10 to 20 seconds.

Now to configure the software.

appliance:/etc# dpkg-reconfigure console-setup
























And that's that!