Nagios sending mails on both IDs - nagios

not able to define separate contacts for different environments. alert notification is sent on both mail id rather it should be send to only one that i have specified in service and host as well.by
Please help me out.

Without knowing the Configuration, it is hard to guess, but i think you are using some wrong configuration.
It should look like this :
Your hostconfiguration:
define host{
use **host-template**
host_name **hostname**
hostgroups **if you have any**
address **the IP**
contacts **Admin for Host**
}
Your serviceconfiguration (e.g. CPU)
define service{
use service-template-interval-60min
service_description CPU
host_name **hostname**
check_command check_nrpe_var!check_var_load!15,10,5!30,25,20
contacts **Your Admin Contact for Service**
}

Related

Nagios - Notifications - Not sending

please help me with Nagios and notifications.
In my service configuration i specify "contacts" . This contact i have specified in contacts.cfg
And there is problem, notifications wont come.
Please help me, why notification does not come to dominik and dominik1 ?
Thank you
There is my host.cfg
define service {
use generic-service
host_name MySERVER
service_description PING
check_command check_ping!100.0,20%!500.0,60%
contacts dominik, dominik2
notification_interval 1
}
There is my contacts.cfg
define contact{
contact_name dominik
use generic-contact
alias Dominik
email dominik#dominik.com
}
define contact{
contact_name dominik1
use generic-contact
alias Dominik1
email dominik1#dominik.com
}
There is my template.cfg
define service{
name generic-service ; The 'name' of this service template
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
is_volatile 0 ; The service is not volatile
check_period 24x7 ; The service can be checked at any time of the day
max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
retry_check_interval 2 ; Re-check the service every two minutes until a hard state can be determined
# contact_groups admins ; Notifications get sent out to everyone in the 'admins' group
notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
notification_interval 60 ; Re-notify about service problems every hour
notification_period 24x7 ; Notifications can be sent out at any time
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
FOR sure i add also template for generic-contact
define contact{
name generic-contact ; The name of this contact template
service_notification_period 24x7 ; service notifications can be sent anytime
host_notification_period 24x7 ; host notifications can be sent anytime
service_notification_options w,u,c,r,f,s ; send notifications for all service states, flapping events, and scheduled downtime events
host_notification_options d,u,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime events
service_notification_commands notify-service-by-email ; send service notifications via email
host_notification_commands notify-host-by-email ; send host notifications via email
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
}
It might not be about the configurations. Just check if their is an email(SMTP) server up and running on your setup. Or add an external SMTP details in Nagios, so that Nagios would be able to send mails.

Change ip of a subscription domain on plesk12

When I create a new subscription it uses a new ip and I'm not able to put to this new subscription one ip used in another subscription. Is not possible?
Yes, it's possible.
By default all new IP addresses has type "Dedicated", you can check and change it to "Shared" in Tools & Settings > IP Addresses > choose desired IP address

zabbix authentication with IBM Lotus Domino

Do some of u guys have some experience with authentication in zabbix using lotus domino? Im not quite sure what to enter there. I know i made some authentication for IBM WebSphere but i cant get it working in zabbix. Can someone give me some tutorial? or explanations? :)
There is :
LDAP HOST : mydomino.local.address
Port : 389
Base DN : ???What is this???
Search attribute : cn;
Bind DN : ???my 'sudo'user / binduser???
Bind password : binduser.password
Ok so I tried it. Also i can easily telnet "mydomino.local.address" on 389 port. So there is nothing bad with connection. Maybe Base DN. Is this something special - unique for each LDAP server like "mycompany DomainName?" or can it be something universal? Alsosearch attribute. I know cn; or uid; or mail; works in WAS.
I would be really glad if someone could just help me with this.
In Domino there are different "Base DNs". For a user search the Base DN typically is o=YourOrganizer, so if your Notesnames look like CN=MartinFric/OU1=IT/O=YourCompany, then the base DN would be o=YourCompany.
Groups do NOT have a Base- DN. If you search for groups, then the Base DN has to be empty.
Bind- DN depends on the configuration of your Domino. Your mail- address will always work as well as your CN- name. So this might be "Martin Fric" or "martin.fric#yourcompany.com". Other variations might work as well. The bind password is the Internet- Password of the bind user (HTTP Password in person document in domino directory).
Usually one creates a specific LDAPBind user in the directory with an internet password to not expose user- passwords to any external program.
The search- attributes depend on what you want to achieve.
Open the Lotus- Notes- Program- Directory of any installed Lotus Notes client in a CMD and type the following:
ldapsearch.exe -h mydomino.local.address -p 389 -D "Martin Fric"
-w YourInternetPassword "(CN=Martin Fric)"
In this query the parameters are:
-h = LDAP HOST
-p = Port
-D = Bind DN
-w = Bind Password
"(cn=Martin Fric)" = Query that sais: Search in (Search attribute) cn for an entry with value "Martin Fric"
If this query succeeeds and the query returns values, then the parameters for zabbix are correct. In that case someone knowing zabbix has to help you further in debugging that.
If this query does NOT succeed, then you need to fix your domino -> Come back with the error mmessage you get for help.

Obtain peferred domain controller (Active Directory) in Mac OS X programmatically

I'd like to get preferred domain controller name/adress on Mac, joined to Active Directory (MS Windows Server with Domain Controller) programmatically with C/Objective-C. The better solution for now is parsing output of dsconfigad -show commandline utility where are such lines:
Advanced Options - Administrative
Preferred Domain controller = 192.168.XXX.XXX
I already tried Open Directory API, as adviced here, but it fails to access nodes far than full name of domain:
// domainNode: "/Active Directory/MYDOMAIN/mydomain.local"
NSArray *domainSubNodes = [domainNode subnodeNamesAndReturnError:&err];
[domainSubNodes count]; // count is 0
Do I need to perform some kind of authorization to access subnodes of domain and how to perform it?
Is there any posix/BSD functions that can obtain domain controller name from pure C code?

where is unique memcache key prefix?

I have installed memcached and drupal module memcache and in linux command line :
-bash-4.1# netstat -tap | grep memcached
tcp 0 0 *:memcache : LISTEN 8431/memcached
tcp 0 0 *:memcache : LISTEN 8431/memcached
Seems like it is listening to IP and Port but now the part where I get it to work with drupal 7.18 so I can see what is going on?
Following these instruction:
$conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc';
$conf['cache_default_class'] = 'MemCacheDrupal';
$conf['memcache_key_prefix'] = 'something_unique';
/* note : Replace the "something_unique" in the last line with your own unique memcache key prefix. */
Where do I find "your own unique memcache key prefix"?
The documentation for the module says:
If you want to have multiple Drupal installations share memcached instances, you need to include a unique prefix for each Drupal installation in the $confarray of settings.php:
$conf['memcache_key_prefix'] = 'something_unique';
You need that parameter only if you have more than one Drupal installation using the same memcached instance; in the case there is just a Drupal installation, you don't need it.
As long as you use a different value for each Drupal installation, you can use the value you want. You could also use the domain name (including the sub-domain name).

Resources