Non optional macro 'rbl-server' used in argument '-s' is missing

icingaweb2

(Fabian) #1

Hi Forum,

I updated our Icinga2-Master and its IcingaWeb2 last friday.
Since then we got a problem with our RBL-Check.
The problem is i cant find anything thats related to an config using “-s” as an argument.

Has someone got an idea?
TIA Fabian

EDIT:
Copyright © 2012-2018 Icinga Development Team (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl2.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

System information:
  Platform: Ubuntu
  Platform version: 14.04.5 LTS, Trusty Tahr
  Kernel: Linux
  Kernel version: 3.19.0-80-generic
  Architecture: x86_64

Build information:
  Compiler: GNU 4.8.2
  Build host: 83f936ff40f1

Application information:

General paths:
  Config directory: /etc/icinga2
  Data directory: /var/lib/icinga2
  Log directory: /var/log/icinga2
  Cache directory: /var/cache/icinga2
  Spool directory: /var/spool/icinga2
  Run directory: /run/icinga2

Old paths (deprecated):
  Installation root: /usr
  Sysconf directory: /etc
  Run directory (base): /run
  Local state directory: /var

Internal paths:
  Package data directory: /usr/share/icinga2
  State path: /var/lib/icinga2/icinga2.state
  Modified attributes path: /var/lib/icinga2/modified-attributes.conf
  Objects path: /var/cache/icinga2/icinga2.debug
  Vars path: /var/cache/icinga2/icinga2.vars
  PID path: /run/icinga2/icinga2.pid

image


(Alex) #2

Hi,

can you share your rbl service definition?

Greetz


#3

Looks like your Icinga is taking the ITL check command in
/usr/share/icinga2/include/plugins-contrib.d/network-services.conf
and your plugin don’t know -s ?
https://icinga.com/docs/icinga2/latest/doc/10-icinga-template-library/#rbl


(Fabian) #4

Thank youm MarcusCaepio,

in the network-services.conf i found the CheckCommand.
the “-s” argument is a required argument. But not set. I think it changed when i updated.


(Fabian) #5

Does Someone know how i can import the array list from “check_rbl.ini” into this file?
Like below doesnt work out for me

object CheckCommand "rbl" {
        import "ipv4-or-ipv6"

        command = [ PluginContribDir + "/check_rbl" ]

        arguments = {
                "-H" = {
                        value = "$rbl_hostname$"
                        description = "Name or IP address of SMTP server to check."
                }
                "-s" = {
                        value = "$rbl_server$"
                        description = "List of RBL servers as an array."
                        required = true
                        repeat_key = true
                }
                "-w" = {
                        value = "$rbl_warning$"
                        description = "Number of blacklisting servers for a warning."
                }
                "-c" = {
                        value = "$rbl_critical$"
                        description = "Number of blacklisting servers for a critical."
                }
                "-t" = {
                        value = "$rbl_timeout$"
                        description = "Seconds before plugin times out (default: 15)."
                }
        }

        vars.rbl_hostname = "$check_address$"
        vars.rbl_timeout = 15
        vars.rbl_warning = 1
        vars.rbl_critical = 1
        vars.rbl_server = "/etc/check_rbl.ini"
}

#6

Looks like rbl_server has to be an array. With your definition it is not.
Try writing the contents of /etc/check_rbl.ini as an array to vars.rbl_server or define it somewhere else (e.g. constants.conf).


(Fabian) #7

Can you tell me what is the “array syntax” of icinga2?

Thanks

EDIT:
I found something:
https://icinga.com/docs/icinga2/snapshot/doc/17-language-reference/#array
I will try this


(Fabian) #8

After formatting my list into an array it works:

vars.rbl_server = [ "0spam.fusionzero.com", "access.redhawk.org", "all.rbl.jp", "all.s5h.net", "all.spamrats.com", "b.barracudacentral.org", "bl.blocklist.de", "bl.emailbasura.org", "bl.mailspike.org", "bl.score.senderscore.com", "bl.spamcop.net", "bl.spameatingmonkey.net", "cidr.bl.mcafee.com", "db.wpbl.info", "dnsbl-1.uceprotect.net", "dnsbl-2.uceprotect.net", "dnsbl-3.uceprotect.net", "dnsbl.dronebl.org", "dnsbl.inps.de", "dnsbl.kempt.net", "dnsbl.rv-soft.info", "dnsbl.sorbs.net", "dnsbl.tornevall.org", "dnsrbl.swinog.ch", "fnrbl.fast.net", "ips.backscatterer.org", "ix.dnsbl.manitu.net", "list.blogspambl.com", "mail-abuse.blacklist.jippg.org", "psbl.surriel.com", "rbl2.triumf.ca", "rbl.choon.net", "rbl.dns-servicios.com", "rbl.polarcomm.net", "spam.abuse.ch", "spam.dnsbl.sorbs.net", "spam.pedantic.org", "spamguard.leadmon.net", "spamrbl.imp.ch", "spamsources.fabel.dk", "st.technovision.dk", "tor.dan.me.uk", "tor.dnsbl.sectoor.de", "truncate.gbudb.net", "ubl.unsubscore.com", "virbl.dnsbl.bit.nl", "zen.spamhaus.org", "cbl.abuseat.org", "dnsbl.cyberlogic.net", "bl.deadbeef.com", "spamtrap.drbl.drand.net", "relays.nether.net", "dyna.spamrats.com", "noptr.spamrats.com", "spam.spamrats.com", "sbl.spamhaus.org", "xbl.spamhaus.org", "blacklist.sci.kun.nl", "dul.ru", "forbidden.icm.edu.pl", "hil.habeas.com", "rbl.schulte.org", "sbl-xbl.spamhaus.org" ]