Hi, many Thanks, its running perfect with $$.
Best Regards, Christian Christian Moreno Moreno System Engineer Offers idealo internet GmbH Ritterstraße 11 10969 Berlin, Deutschland Tel.: +49 (0)30 40 30 10 33 Fax: +49 (0)30 221 94 33 - 21 E-Mail: christian.mor...@idealo.de Geschäftsführer: Dr. Albrecht von Sonntag, Dr. Philipp-Christopher Peitsch HRB 76749 – Amtsgericht Berlin-Charlottenburg [image: idealo Logo] <http://www.idealo.de/> 2017-07-11 12:00 GMT+02:00 <icinga-users-requ...@lists.icinga.org>: > Send icinga-users mailing list submissions to > icinga-users@lists.icinga.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.icinga.org/mailman/listinfo/icinga-users > or, via email, send a message with subject or body 'help' to > icinga-users-requ...@lists.icinga.org > > You can reach the person managing the list at > icinga-users-ow...@lists.icinga.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of icinga-users digest..." > > > Today's Topics: > > 1. Syntax error $ undefined for check_by_ssh > (Christian Moreno Moreno) > 2. Re: Syntax error $ undefined for check_by_ssh (Gerald Vogt) > 3. Re: Syntax error $ undefined for check_by_ssh (Stephan Tesch) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 10 Jul 2017 15:00:44 +0200 > From: Christian Moreno Moreno <christian.mor...@idealo.de> > To: icinga-users@lists.icinga.org > Subject: [icinga-users] Syntax error $ undefined for check_by_ssh > Message-ID: > <CAHCD4S-ujySr7XMZxEDt+zjwHZdU0Mn97U5km_xA2=PC11cKEQ@ > mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hello, > > We try to configure one new check with check_by_ssh: > > apply Service "check_access_log" { > import "standard-service" > check_command = "check_by_ssh" > > > vars.ssh_command = '/usr/lib/nagios/plugins/check_file_age > /var/log/axy/access.$(date +%Y-%m-%d).log -w 68400 -c 68400' > assign where "frontend-ipc" in host.groups > } > > But we got one Syntax Error for the $: > > /etc/init.d/icinga2 checkconfig > [....] checking Icinga2 configuration > information/cli: Icinga application loader (version: r2.6.3-1) > information/cli: Loading configuration file(s). > critical/config: Error: syntax error, unexpected $undefined > Location: in > /etc/icinga2/zones.d/global-templates/services/check_logfiles.conf: > 62:28-62:28 > /etc/icinga2/zones.d/global-templates/services/check_logfiles.conf(61): > /etc/icinga2/zones.d/global-templates/services/check_logfiles.conf(62): > vars.ssh_command = '/usr/lib/nagios/plugins/check_file_age > /var/log/price-comparison/access.$(date +%Y-%m-%d).log -w 68400 -c 68400' > /etc/icinga2/zones.d/global-templates/services/check_logfiles.conf(63): > assign where "frontend-ipc" in host.groups > > [FAIL] checking Icinga2 configuration. Check '/var/log/icinga2/startup.log' > for details. ... failed! > > We tryed with \$ but it doesnt run... has someone one idea? > > Regards, > Christian > > > Christian Moreno Moreno > System Engineer Offers > > idealo internet GmbH > Ritterstra?e 11 > 10969 Berlin, Deutschland > Tel.: +49 (0)30 40 30 10 33 > Fax: +49 (0)30 221 94 33 - 21 > E-Mail: christian.mor...@idealo.de > Gesch?ftsf?hrer: > Dr. Albrecht von Sonntag, Dr. Philipp-Christopher Peitsch > HRB 76749 ? Amtsgericht Berlin-Charlottenburg > [image: idealo Logo] <http://www.idealo.de/> > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: <http://lists.icinga.org/pipermail/icinga-users/ > attachments/20170710/abd45dab/attachment-0001.html> > > ------------------------------ > > Message: 2 > Date: Mon, 10 Jul 2017 15:31:13 +0200 > From: Gerald Vogt <v...@spamcop.net> > To: icinga-users@lists.icinga.org > Subject: Re: [icinga-users] Syntax error $ undefined for check_by_ssh > Message-ID: <8125fb52-eb81-a13a-1875-ff075f624...@spamcop.net> > Content-Type: text/plain; charset=utf-8; format=flowed > > On 10.07.17 15:00, Christian Moreno Moreno wrote: > > Hello, > > > > We try to configure one new check with check_by_ssh: > > > > apply Service "check_access_log" { > > import "standard-service" > > check_command = "check_by_ssh" > > > > > > vars.ssh_command = '/usr/lib/nagios/plugins/check_file_age > > /var/log/axy/access.$(date +%Y-%m-%d).log -w 68400 -c 68400' > > assign where "frontend-ipc" in host.groups > > } > > > > But we got one Syntax Error for the $: > > Correct. The $ sign starts a macro. See > > https://docs.icinga.com/icinga2/latest/doc/module/ > icinga2/chapter/monitoring-basics#runtime-macros > > > /etc/init.d/icinga2 checkconfig > > [....] checking Icinga2 configuration > > information/cli: Icinga application loader (version: r2.6.3-1) > > information/cli: Loading configuration file(s). > > critical/config: Error: syntax error, unexpected $undefined > > Location: in > > /etc/icinga2/zones.d/global-templates/services/check_logfiles.conf: > > 62:28-62:28 > > /etc/icinga2/zones.d/global-templates/services/check_logfiles.conf(61): > > /etc/icinga2/zones.d/global-templates/services/check_logfiles.conf(62):? > > ??????? vars.ssh_command = '/usr/lib/nagios/plugins/check_file_age > > /var/log/price-comparison/access.$(date +%Y-%m-%d).log -w 68400 -c > 68400' > > /etc/icinga2/zones.d/global-templates/services/check_logfiles.conf(63):? > > ??????? assign where "frontend-ipc" in host.groups > > > > [FAIL] checking Icinga2 configuration. Check > > '/var/log/icinga2/startup.log' for details. ... failed! > > > > We tryed with \$ but it doesnt run... has someone one idea? > > What makes you think that it doesn't _run_? > > It should run, even though it won't do what you expect as you don't call > a shell which could expand the $() but check_file_age... > > -Gerald > > > > > > Regards, > > Christian > > > > > > Christian Moreno Moreno > > System Engineer Offers > > > > idealo internet GmbH > > Ritterstra?e 11 > > 10969 Berlin, Deutschland > > Tel.: +49 (0)30 40 30 10 33 > > Fax: +49 (0)30 221 94 33 <tel:%2B49%20%280%2930%20221%2094%2033> - 21 > > E-Mail: christian.mor...@idealo.de <mailto:christian.mor...@idealo.de> > > Gesch?ftsf?hrer: > > Dr. Albrecht von Sonntag, Dr. Philipp-Christopher Peitsch > > HRB 76749 ? Amtsgericht Berlin-Charlottenburg > > idealo Logo <http://www.idealo.de/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > icinga-users mailing list > > icinga-users@lists.icinga.org > > https://lists.icinga.org/mailman/listinfo/icinga-users > > > > > ------------------------------ > > Message: 3 > Date: Mon, 10 Jul 2017 21:18:45 +0200 > From: Stephan Tesch <step...@tesch.cx> > To: icinga-users@lists.icinga.org > Subject: Re: [icinga-users] Syntax error $ undefined for check_by_ssh > Message-ID: <c9f3cbe9-3cfb-7733-acf2-62b09dbb3...@tesch.cx> > Content-Type: text/plain; charset=utf-8 > > Am 10.07.2017 um 15:00 schrieb Christian Moreno Moreno: > > Greetings, > > > But we got one Syntax Error for the $: > > > > /etc/init.d/icinga2 checkconfig > > [....] checking Icinga2 configuration > > information/cli: Icinga application loader (version: r2.6.3-1) > > information/cli: Loading configuration file(s). > > critical/config: Error: syntax error, unexpected $undefined > > Location: in > > /etc/icinga2/zones.d/global-templates/services/check_logfiles.conf: > > 62:28-62:28 > > /etc/icinga2/zones.d/global-templates/services/check_logfiles.conf(61): > > /etc/icinga2/zones.d/global-templates/services/check_ > logfiles.conf(62):???????? > > vars.ssh_command = '/usr/lib/nagios/plugins/check_file_age > > /var/log/price-comparison/access.$(date +%Y-%m-%d).log -w 68400 -c > 68400' > > /etc/icinga2/zones.d/global-templates/services/check_ > logfiles.conf(63):???????? > > assign where "frontend-ipc" in host.groups > > > > [FAIL] checking Icinga2 configuration. Check > > '/var/log/icinga2/startup.log' for details. ... failed! > > > > We tryed with \$ but it doesnt run... has someone one idea? > > Did you try it with $$ ? > > To quote the documentation: > > When using the $ sign as single character you must escape it with an > additional dollar character ($$). > > Best regards, > Stephan > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > icinga-users mailing list > icinga-users@lists.icinga.org > https://lists.icinga.org/mailman/listinfo/icinga-users > > > ------------------------------ > > End of icinga-users Digest, Vol 43, Issue 8 > ******************************************* >
_______________________________________________ icinga-users mailing list icinga-users@lists.icinga.org https://lists.icinga.org/mailman/listinfo/icinga-users