Added by Cameron Summers, last edited by Cameron Summers on Jun 02, 2008
Listener not ready to accept data feeds ....
Couldn't connect to localhost:4913: IO::Socket::INET: connect: Connection refused
gwservices start failed. [ FAILED ]
-check /etc/hosts
-check this file, /usr/local/groundwork/config/foundation.properties
-if empty, copy the contents of a working one
[root@monitor ~]# /etc/init.d/gwservices restart
Stopping Groundwork Services [ OK ]
Starting Groundwork Services
Connecting to Foundation listener Host:localhost Port:4913
Listener not ready to accept data feeds ....
Listener ready to accept data feeds....
gwservices start [OK ]
Checks
PING
The PING is currently set to: 100.0,20%!500.0,60%
,% -c ,%
THRESHOLD is ,% where is the round trip average travel
time (ms) which triggers a WARNING or CRITICAL state, and is the
percentage of packet loss to trigger an alarm state.
Host and Service Profiles
This is very handy when you want to give access to users to add their own servers. They log in as an operator and will have access to Configuration eZ.
Some considerations
-the service checks you use will need to be constant ie. if it is an active CPU check, the service check for CPU will always have to be active. Also check the contact groups.
-if you need to check on different ports, you wil need to change the command and the service to use the unique port.
-for unique ports you will also need to create a new
Change a service check globally
-change disk warning threshold from 95% to 90%
-Go to services and set the service check for disk accordingly
-Go to apply hosts and tick 'apply service check' and select 'replace existing service properties (force inheritance).'
-Click Apply
Migrating from one box to different hardware
Pay special attention to /etc/hosts
-make backups of all cfg files from the interface and copy them to another folder
-make backups of your plugins, and any other folders that might have custom branding like images and logos
-dump the sql db's just in case
-remove with rpm -e all groundwork packages
-remove all java packages unless the version is corect
-remove all mysql packages unless version is correct
-install & config java as per wiki
-install mysql packages
-install foundation
-install groundwork core
-copy cfg files into the location they should be, overwriting the newly installed ones
-log onto interface and go to control and perform a load
-install and configure gnokii
-at this stage all hosts and services should appear
-you will have to set up users manually
Side issues
Install / test Gnokii - add nagios to the uucp and tty groups for smsing and restart gwservices
Check perms and ownership of plugins in libexec
Check that you have the ssl and no ssl plugins
Check the authtype for nagios compare to that old and new apache conf on monitor
SQL Replication stuff
Guava DB stuff
IP Address details
Plugins
Upgrading to latest version on the same hardware
-make backups of all cfg files from the interface and copy them to another folder
-make backups of your plugins, and any other folders that might have custom branding like images and logos
-dump the sql db's just in case
-remove with rpm -e all groundwork packages
-remove all java packages unless the version is corect
-remove all mysql packages unless version is correct
-install foundation
-install groundwork core
-copy cfg files into the location they should be, overwriting the newly installed ones
-log onto interface and go to control and perform a load
-at this stage all hosts and services should appear
-you will have to set up users manually
-copy back your plugins and check the permissions
-change the icmp perms like so
chown root:root /usr/local/groundwork/nagios/libexec/check_icmp
chmod ug+s /usr/local/groundwork/nagios/libexec/check_icmp
-check that naigos and nobody user is in the uucp group (for sms and gnokii)
-set up your users in GW and set (if applicable) the LDAP stuff
Rebranding
To change Icons
/usr/local/groundwork/bin/pngtogd2 win1.png win1.gd2 1 1
in /usr/local/groundwork/nagios/share/images/logos
Login page is here:
vi /usr/local/groundwork/guava/themes/gwmos/templates/login.xml
Top right logo is here:
/usr/local/groundwork/guava/themes/gwmos/images/logo.gif
Top right logo is here:
/usr/local/groundwork/guava/themes/gwmos/templates/login.xml
Background logo is here:
/usr/local/groundwork/guava/themes/gwmos/images/topBg02.jpg
Background logo is specified here:
/usr/local/groundwork/guava/themes/gwmos/styles/gwmos.css
Home Page is here:
/usr/local/groundwork/guava/packages/guava/templates/home.xml
cd /usr/local/groundwork/guava/
cp templates/login.xml templates/login.xmlorig
vi templates/login.xmlorig
cp images/logo.gif images/logo.giforig
cp themes/gwmos/theme.xml themes/gwmos/theme.xmlorig
mv guava/packages/guava/templates/home.xml guava/packages/guava/templates/home.xmlorig
cp guava/packages/guava/templates/home.xmlorig guava/packages/guava/templates/home.xml
vi guava/packages/guava/templates/home.xmlorig
cp guava/packages/guava/templates/home.xmlorig guava/packages/guava/templates/home.xml
/monitor/themes/gwmos/images/topBg02.jpg
/usr/local/groundwork/guava/themes/gwmos/templates/login.xml
Do an export under 'control' /usr/local/groundwork/apache2/htdocs/monarch/download
SNMP
APC temperature
/usr/local/nagios/libexec/check_snmp -H 10.0.0.235 -o .1.3.6.1.4.1.318.1.1.10.2.3.2.1.4.1
Pruning notifications
Check that 'is volatile' is not set
Check cube max check attempts, retry interval match the interface
incoming/outgoing queue stats shows .
add a nagios group
add a nagios user to the nagios group
add nagios to the exim group
If outgoing still does not work but incoming does, then check the outgoing check within the check_mailq.final script is not calling exim4_out
Mass adding hosts and services
+-----------------------+----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------+----------------------+------+-----+---------+----------------+
| host_id | int(6) unsigned | NO | PRI | NULL | auto_increment |
| name | varchar(255) | YES | UNI | NULL | |
| alias | varchar(255) | NO | | | |
| address | varchar(50) | NO | | | |
| os | varchar(50) | YES | | NULL | |
| hosttemplate_id | smallint(4) unsigned | YES | | NULL | |
| hostextinfo_id | smallint(4) unsigned | YES | MUL | NULL | |
| hostprofile_id | smallint(4) unsigned | YES | MUL | NULL | |
| host_escalation_id | smallint(4) unsigned | YES | MUL | NULL | |
| service_escalation_id | smallint(4) unsigned | YES | MUL | NULL | |
| status | tinyint(1) | YES | | NULL | |
| comment | text | YES | | NULL | |
+-----------------------+----------------------+------+-----+---------+----------------+
Put hosts into a file on the backend and import try and add the remote/generic host field and hostgroup field???
Check the file /tmp/hosts and /tmp/hostfull on server are create a new file to work from like so:
mysql monarch
select * from hosts limit 10 into outfile '/tmp/import';
Then delete the fields all except name, alias, hostname, and hosttemplate_id
mysql monarch
LOAD DATA LOCAL INFILE '/tmp/hosts' into table hosts fields terminated by '\t' lines terminated by '\n' (name,alias,address,hosttemplate_id);
Use a service profile to apply services to the entire hostgroup
If the services are remote, change them to remote, apply the service profile, then change them back to generic with the correct service check (as XX will be using the same services with the SBS profile and the services need to be generic at the time of adding).
When adding clients you can change any service eg CPU to remote, or generic without affecting existing hosts and apply this to a service profile and entire hostgroup.
There is aways a copy so the original service check command for a generic service can be checked in the event you need to create a new service profile or apply a service profile. So check the
service before applying the profile to a hostgroup.
Cannot delete something
eg cannot remove 2d coords
go into sql on the backed with mysql mailscanner
select * from extended_info_coords into outfile '/tmp/data.txt';
vi the file and check the host_id then
delete from extended_info_coords where id='21';
Go onto the backend
mysql monarch
check 'mysql stuff' to confirm commands
delete from DB and recheck interface
Customising the statusmap
-upload a png file that you want to use as your underlay
-convert the png file to a gd file using pngtogd in /usr/local/groundwork/bin/pngtogd
-save the file in /usr/local/groundwork/nagios/share/images/
-specify the file in 'Configuration-control-nagios cgi configuration' in 'Statusmap background image:'
-then use GIMP to load your background image and work out the coordinates in pixels to place your hosts
-2D Coords are specified as x,y
-the changes need to be committed for each change to reflect under 'control'
-when complete, change the 'Default statusmap layout:' to 'User Supplied Coordinates'
Customising the icons
-scp your pre-preparared *png icons to the server here: /usr/local/groundwork/nagios/share/images/logos/
-add a new 'extended host info template' under hosts
-choose this icon template within the host itself
-test/commit the changes and reload the map
Moving hosts between parents
-change the parent
-change the hostgroup too (this affects the status overview)
Upgrading the Nagios bundled with Groundwork
Download latest Nagios
tar -xzpvf nagios-x.x.x.tar.gz
cd nagios-x.x.x
./configure --prefix=/usr/local/groundwork/nagios --sbindir=/usr/local/groundwork/apache2/cgi-bin/nagios --with-gd-lib=/usr/local/groundwork//lib --with-gd-inc=/usr/local/groundwork//include --with-
nagios-user=nagios --with-nagios-group=nagios --with-command-user=nagios --with-command-group=nagios
make all
make install
Upgrading
5.0.5
RPM Centos 4 > http://kent.dl.sourceforge.net/sourcefo ... 4.i386.rpm
Readme > http://easynews.dl.sourceforge.net/sour ... .5-208.txt
Install > http://easynews.dl.sourceforge.net/sour ... _5.0.5.txt
Rel Notes > http://easynews.dl.sourceforge.net/sour ... .5-208.txt
Groups
Groups can be used if you want to override certain options in hosts/services eg contact group.
Hosts can be kept in the configuration but disabled in status viewer & Nagios GUI by deactivating the group, this is useful for implementation/testing phase.
Losing Admin account (for some strange reason)
htpasswd -n admin
Add a client login
-login to backend and set up the users
-
/usr/local/groundwork/apache2/bin/htpasswd -b /usr/local/groundwork/nagios/etc/htpasswd.users verizonjhb verijhb07
Adding password for user verizonjhb
-On the GW frontend, create a contactgroup, and contact with the same username as the one you set up with htpasswd
-Add the contacts for that contact group
-Make that contactgroup the contactgroup of the hosts they need access to
-test by logging in to http://www.server.co.za/
Recap - Host(s) must have a contactgroup set - don't worry about each service. Contactgroup must have contacts set and contacts must have contactgroup set!