> On 26 Jan 2016, at 14:08, Gunnar Beutner <gunnar.beut...@netways.de> wrote: > > Hello, > > The >= operator can be used to alphabetically order strings: > > <1> => "a" >= "a" > true > <2> => "a" >= "b" > false > <3> => "b" >= "a" > true > > As you’ve pointed out match() and regex() are much better choices for this > problem. > > > The fact that PlatformName contains garbage atm (NAME=„…) is already being > worked on.
Will hit the next bugfix release - https://dev.icinga.org/issues/10784#change-47228 Please check the roadmap for open issues before asking for a release date ;-) Kind regards, Michael > > Kind regards > Gunnar Beutner > > > > > On 26/01/16 14:04, "icinga-users on behalf of Florian Bachmann" > <icinga-users-boun...@lists.icinga.org on behalf of bachman...@gmail.com> > wrote: > >> Hi, >> >> >> I would guess that the >= operator is strictly for comparing numerical >> values. For string matching you would really need to use either of the >> built-in "match()" or "regex()" functions. >> >> >> Like so: >> >> >> assign where match ("Ubuntu*", PlatformName) >> >> >> Kind regards >> Florian >> >> >> 2016-01-26 10:33 GMT+01:00 Muhammad Panji >> <sumodi...@gmail.com>: >> >> Hi All, >> I'm trying to use Platform* constants to group hosts. My >> /etc/conf.d/groups.conf below : >> >> >> object HostGroup "Ubuntu" { >> display_name = "Ubuntu" >> >> assign where PlatformName >= "Ubuntu" >> >> } >> >> object HostGroup "PlatformName" { >> display_name = PlatformName >> >> assign where PlatformName >= "" >> } >> >> object HostGroup "PlatformArchitecture" { >> display_name = PlatformArchitecture >> assign where PlatformArchitecture >= "" >> } >> >> Unfortunately the PlatformName show _NAME="Ubuntu 14.04.3 LTS instead of >> only "Ubuntu 14.04.3 LTS". PlatformVersion also show ID=\"14.04 instead of >> only 14.04. >> >> Is this expected or bug? if expected why icinga have to use _NAME and ID in >> front of each value? Are there any way including text processing to remove >> _NAME and ID? >> >> I use Ansible to provision icinga so I might be able to assign ansible >> variable but I think using default consts might be better or maybe set >> variable per host is better? >> Thank you. >> Regards, >> >> >> >> >> >> -- >> Muhammad Panji >> http://www.panji.web.id >> http://www.kurungsiku.com >> >> >> >> _______________________________________________ >> icinga-users mailing list >> icinga-users@lists.icinga.org >> https://lists.icinga.org/mailman/listinfo/icinga-users >> >> >> >> >> >> > > -- > Gunnar Beutner > Senior Developer > > NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg > Tel: +49 911 92885-0 | Fax: +49 911 92885-77 > CEO: Julian Hein, Bernd Erk | AG Nuernberg HRB18461 > http://www.netways.de | gunnar.beut...@netways.de > > ** OSDC 2016 - April - netways.de/osdc ** > ** OSBConf 2016 - September - osbconf.org ** > _______________________________________________ > icinga-users mailing list > icinga-users@lists.icinga.org > https://lists.icinga.org/mailman/listinfo/icinga-users -- Michael Friedrich, DI (FH) Senior Developer NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg Tel: +49 911 92885-0 | Fax: +49 911 92885-77 CEO: Julian Hein, Bernd Erk | AG Nuernberg HRB18461 http://www.netways.de | michael.friedr...@netways.de ** OSDC 2016 - April - netways.de/osdc ** ** OSBConf 2016 - September - osbconf.org ** _______________________________________________ icinga-users mailing list icinga-users@lists.icinga.org https://lists.icinga.org/mailman/listinfo/icinga-users