Recuerda, no borrar los comandos que se usan en lase definiciones de host, o para enviar notificaciones
DELETE FROM service WHERE id NOT IN (SELECT service_id FROM service_to_host)
DELETE FROM host_service_param WHERE service_id NOT IN (SELECT service_id FROM service_to_host)
DELETE FROM command WHERE id NOT IN (SELECT command_id FROM service) AND id NOT IN (15,5,287,253,103,4,104,3,43,22)
lunes, 23 de mayo de 2011
Cambiar el usuario del nagios al enviar email
- Cambiar hostname en: /etc/postfix/main.cf
- Cambiar hostname en: /etc/mailname
- Reiniciar postfix
- Cambiar el Nombre del usuario de Nagios en /etc/passwd
Live Status for Nagios
Instalé todo el paquete check_mk. por tanto livestatus vino con el paquete.
http://mathias-kettner.de/checkmk_livestatus.html
Tratar de instalar solo el livestatus, no el resto de las cosas
Instalando el paquete solamente hace falta bajarlo de aquí:
http://mathias-kettner.de/download/
Despues en Thruk el fichero de configuración es: thruk.conf en la carpeta raiz the thruk. Copiar cualquiera de los ejemplos
Como probar que funciona??
desde donde sse instaló, correo un comando tcp en el unix socket para ver si resuelve, se explica en la página.
No olvidar configurar /etc/xinetd.d/livestatus y reiniciar xinetd para acceder desde otra máquina
http://mathias-kettner.de/checkmk_livestatus.html
Tratar de instalar solo el livestatus, no el resto de las cosas
Instalando el paquete solamente hace falta bajarlo de aquí:
http://mathias-kettner.de/download/
Despues en Thruk el fichero de configuración es: thruk.conf en la carpeta raiz the thruk. Copiar cualquiera de los ejemplos
Como probar que funciona??
desde donde sse instaló, correo un comando tcp en el unix socket para ver si resuelve, se explica en la página.
No olvidar configurar /etc/xinetd.d/livestatus y reiniciar xinetd para acceder desde otra máquina
lunes, 2 de mayo de 2011
Ver tamaño de las bases de dato
SELECT table_schema, sum(data_length) / 1024 / 1024 "data", sum(index_length) / 1024 / 1024 "index", sum( data_length + index_length ) / 1024 / 1024 "total" FROM information_schema.TABLES GROUP BY table_schema \G;
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema;
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema;
Puppet in Solaris
Instalation
Puppet requires both Facter and Ruby, neither of which will be found in a standard Solaris 8/9/10 installation.
A good and easy way to install Puppet and its dependencies is to use the OpenCSW archive. The first step is to install pkgutil, which enables you to easily retrieve software from the OpenCSW repositories.
With pkgutil installed, you can use it to install Puppet and it’s dependencies:
# /opt/csw/bin/pkgutil --yes --install puppetNote that this not only installs puppet, it also enables the puppet agent. This installs a SMF(5) service:
# svcs svc:/network/puppetd:defaultOnce installed you must create de /etc/puppet/puppet.conf, and make sure that the ssldir exist. By default the ssldir point to /var/opt/csw/puppet/ssl, and this location doesn't exist.
Even when client defines ways to provide the puppetmaster, the way it worked for me was adding an entry in /etc/host for puppet, which is the default server the client takes.
Now you can restart you client puppet ;-)
Configuration
Puppet configuration can also be managed via configuration file. Puppet’s configuration file model is in the style of INI files. Each file is divided into namespace sections, and each section name is enclosed in parentheses and named for the Puppet function it configures; for example, the namespace used to configure the Puppet client daemon is called [puppetd]. The use of namespaces means options can be used in multiple namespaces, if the option is relevant to the binary being configured. For example, you can specify the same option twice, with different values, in the [puppetd] and [puppetmasterd] namespaces, and each binary will use only the configuration option contained in its own namespace.
Sections are:
main: General configuration options for multiple elements of Puppet
puppetd: Configuration options related to the Puppet client daemon
puppetmasterd: Configuration options related to the Puppet master daemon
An example:
[main]
vardir = /var/lib/puppet
logdir = /var/log/puppet
[puppetd]
localconfig = $vardir/localconfig
You can also use any configuration option from the Puppet configuration file on the command line by prefixing it with --. So to specify the vardir option on the command line, we would specify --vardir as an argument. Boolean configuration options are specified on the command line using an on/off model like so:
# puppetd --trace
# puppetd --no-trace
Suscribirse a:
Entradas (Atom)