Solaris 10, nagios configuration



I just completed the installation of Nagios 3.0.3 on a Solaris server and it seems the daemon is starting.

I would like to start monitoring another system using ssh method.

Can anybody give me an idea how to proceed to accomplish that ?



Check_ssh plugin maybe?
Have you read documentation on how to setup new hosts and services? If not, you should… :slight_smile:


I do have installed the plugins on the server.

I have put the following entry in the nagios.cfg

and edited servers.cfg the following way

define host{
check_command check_ping

max_check_attempts 10

notification_interval 120

notification_period bus_hours

notification_options admins

    contact_groups          admins

But during the pre-flight check it gives the following

Error: Could not open config directory ‘/opt/local/nagios/etc/objects/servers.cfg’ for reading…

Any idea where i am wrong.
Any help is appreciated.


cfg_dir means directory, and you have specified the file there. The thing you should do is:
if that is the directory where you keep your configuration files.


You need the chech_by_ssh plugin for monitoring other clients via SSH.
I use it for our HP-UX.


You have to make sure the nagios server can ssh to the client machine without authentication.
You will find more info about that on the net.

‘check_remote_users’ command definition

define command{
command_name check_ssh_users
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C “$USER1$/check_users -w $ARG1$ -c $ARG2$”

#The following service will monitor the CPU load on the remote host.

define service{
use generic-service
host_name hp-ux-02
service_description check_users
check_command check_ssh_users!200!500


Guys, thank you.

Please correct me if i am wrong on the following.

unixadmins is configured as a contact group and the contacts have given a valid email addresses to send notification.

Aim: Start monitoring a solaris server using check_ping and if it is not pingable send alerts to unixadmins

Step 1) Create a hosts.cfg file at /opt/local/nagios/etc/objects

Step 2) edit hosts.cfg and put the following entry.

define host{
hostname nair
alias nair
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
check_command check-host-alive
notification_period workhours
notification_interval 10
notification_options d,u,r
contact_groups unixadmins
register 0

Step 3) do the pre-flight check. Do you think this will work ?


That will work.
But if you want the check_ping to be checked regularly, you should also create a service fot that host with check_ping, cause host definition and it’s check-host-alive won’t be checked on regular bases. It’s main purpose is to check if host is alive when everything else fails.

In that service definition also put same contact_groups as for host definition.
With that service, testing of host reachability is more precise and it will show you much faster how your configuration and checking works. You will get your results more accurate.

And don’t foget to add your host to some hostgroup, 'cause otherwise you won’t be able to see your host in your web GUI of Nagios


I have one quick question before i do anything more.

I need to do the monitoring of the local Solaris server before start monitoring any other server.

These are the messages i am receiving in the nagios.log file. How can i make it sending this messages as an email.

Assume, i have created contact groups and contact. Where i am wrong.

[1222788071] Warning: The check of service ‘HTTP’ on host ‘localhost’ looks like it was orphaned (results never came back). I’m scheduling an immediate check of the service…
[1222788131] Warning: The check of service ‘Swap Usage’ on host ‘localhost’ looks like it was orphaned (results never came back). I’m scheduling an immediate check of the service…



Also, do you know from where i can get a documentation on configuration of nagios on Solaris ?


Maybe you should reinstall your Nagios. Those orphaned services don’t look good to me. Don’t know if these messages are meant to be sent as notifications.

This is one Solaris tutorial I’ve found:


Here is a guide I wrote…

I had some issues with notifications but I solved that by creating a template
in templates.cfg.



Thank you for sharing the info. My current setup is working now for the local machine and i am able to get notifications properly for the local machine.