Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
kithai
Posts: 11 Joined: Mon Nov 14, 2016 3:42 am
Post
by kithai » Thu Nov 17, 2016 10:52 am
Hi!
So i'm trying to set up a service with check_email_receive plugin wich search for mail subjects like: MySQL Backups success for "HOSTNAME"
So i need the service to recognize different host names, instead of mount a service for each hosts. My first two attempts:
1-
commands.cfg
Code: Select all
/check_imap_receive -H $ARG1$ -U [email protected] -P password -s SUBJECT -s $ARG2$ --search-critical-max 1000 --nodelete --search-critical-min -1 --search-warning-min 1 --ssl
services.cfg
Code: Select all
check_command check_email_receive_mysql!smtp.domain.com!"MySQL Backup Log for"$HOSTNAME
2-
commands.cfg
Code: Select all
/check_imap_receive -H $ARG1$ -U [email protected] -P password -s SUBJECT -s $ARG2$ $HOSTNAME --search-critical-max 1000 --nodelete --search-critical-min -1 --search-warning-min 1 --ssl
services.cfg
Code: Select all
check_command check_email_receive_mysql!smtp.domain.com!"MySQL Backup Log for"
And nothing. Any suggestions, ideas?
Thanks!
dwhitfield
Former Nagios Staff
Posts: 4583 Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:
Post
by dwhitfield » Thu Nov 17, 2016 11:53 am
Is check_email_receive_mysql something you've written? Could you post the code?
Could you also post the output of ls /usr/local/nagios/libexec/ ?
What version of Core are you running? Did you compile from source or install from distro repos? On what OS are you running Nagios?
Thanks!
Last edited by
dwhitfield on Fri Nov 18, 2016 10:29 am, edited 1 time in total.
Reason: the postess with the mostess
kithai
Posts: 11 Joined: Mon Nov 14, 2016 3:42 am
Post
by kithai » Fri Nov 18, 2016 3:00 am
Hi! Thanks for your reply!
No, "check_email_receive_mysq" it's just the name I gave to the command for the "check_imap_receive" plugin, because we use same plugin for different purpouse so i summon especificaly for MySQL with that name in services.cfg
Code: Select all
define command{
command_name check_email_receive_mysql
command_line sudo perl $USER1$/check_imap_receive -H $ARG1$ -U [email protected] -P password -s SUBJECT -s $ARG2$ $HOSTNAME(with hostname here did'nt work) --search-critical-max 1000 --nodelete --search-critical-min -1 --search-warning-min 1 --ssl
}
I can't show you the output os ls /libexec because of company's security reasons (paranoids...) but there are just a bunch of plugins (default and downloaded) and personal scripts
I'm running Nagios 4.1.1 on Debian 8 "jessie"
Thanks again!
dwhitfield
Former Nagios Staff
Posts: 4583 Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:
Post
by dwhitfield » Fri Nov 18, 2016 10:46 am
Is it possible to PM the list of plugins?
kithai
Posts: 11 Joined: Mon Nov 14, 2016 3:42 am
Post
by kithai » Mon Nov 21, 2016 10:50 am
Hi! And again, thanks for your reply
This is the content of /libexec:
Code: Select all
check_apt check_ghettovcb.sh check_mrtg.sh check_ping check_snmp_load.pl check_veritasjobs.sh
check_breeze check_hp_bladechassis check_mrtgtraf check_pop check_snmp_load.sh check_wave
check_by_ssh check_hpjd check_mrtg_ZM.sh check_procs check_snmp_memory check_wsc_v12.pl
check_clamd check_http check_mssql_health check_snmp_mem.pl check_x224
check_cluster check_http_internet.sh check_mssql_health.sh check_prueba.sh.save check_snmp_process.pl
check_dhcp check_icmp check_mysqld.pl check_queue_exchange.sh check_spop eventhandlers
check_dig check_ide_smart check_nagios check_real check_ssh
check_disk check_ifoperstatus check_netapp_ontap.pl check_rpc check_ssmtp
check_disk_smb check_ifstatus check_nntp check_sensors check_swap negate
check_dns check_imap check_nntps check_simap check_sysjobshistory.sh restart-service.sh
check_dnsext check_imap_receive check_nt check_smb.sh check_tcp snmp_disk
check_dummy check_ircd check_ntp check_smtp check_time urlize
check_esx check_jabber check_ntp_peer check_snmp check_traceroute.sh utils.pm
check_file_age check_load check_ntp_time check_snmp_cpuload.pl check_udp utils.sh
check_flexlm check_log check_nwstat check_snmp_disk_esxi.sh check_ups
check_flexlm.plx check_mailq check_oracle check_snmp_disk.sh check_uptime
check_ftp check_mrtg check_overcr check_snmp_hp-hardware.sh check_users
Thanks for your help!