[SOLVED]System monitoring: host recognition, service mapping

Moderator: crythias

Locked
artturi
Znuny newbie
Posts: 24
Joined: 11 Nov 2012, 00:14
Znuny Version: 3.1.11
Real Name: Mikael Kermorgant
Company: Iufm de Paris

[SOLVED]System monitoring: host recognition, service mapping

Post by artturi »

Hello,

I've setup system monitoring with host (from ccmdb) linking. it fails recognizing the host with error :
Could not find any CI with the name 'azimbra '.
The regexp is

Code: Select all

\s*Host:\s+(.*)\s*
The mail contains

Code: Select all

State: PROBLEM
Host: azimbra
Service: Informatique::Infrastructures::Hébergement
There is a computer named 'azimbra' in the cmdb, but the log messages looks for 'azimbra ' (notice the space at the end).

Do you see where this space can come from ?
(I've not found a space in the name in the monitoring system, nor in the mail.)

Regards,

Mikael
Last edited by artturi on 14 Dec 2012, 15:34, edited 3 times in total.
Mikael
Using ORS::ITSM 3.1.11-3.1.6 on Debian
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: system monitoring

Post by crythias »

artturi wrote:\s*Host:\s+(.*)\s*
may I suggest that you might change (.*) to (\w*) so it doesn't match "anything" but only word characters?
This won't match a minus/dash/special characters in the hostname, though, so if you need it ([\w-]*)

http://www.regexpal.com/
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
artturi
Znuny newbie
Posts: 24
Joined: 11 Nov 2012, 00:14
Znuny Version: 3.1.11
Real Name: Mikael Kermorgant
Company: Iufm de Paris

Re: system monitoring

Post by artturi »

Thanks, that fixed the issue.

By the way, I also have a problem with the service the ticket is associated to.

In the ticket's history, I can see :
TicketDynamicFieldUpdate Mise à jour: FieldName=TicketFreeText2;Value=Informatique::Infrastructures::Hébergement ; - root@localhost (Admin OTRS)
But nothing appears on the interface. If I manually change the service via the "priority screen", I get
ServiceUpdate Service positionné à Informatique::Infrastructures::Hébergement (ID=5). - Username 12.12.2012 16:31:24
Seems something is badly configured. Can you help me with that ?

Regards,
Mikael
Using ORS::ITSM 3.1.11-3.1.6 on Debian
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: system monitoring

Post by crythias »

A dynamic field isn't a service.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
artturi
Znuny newbie
Posts: 24
Joined: 11 Nov 2012, 00:14
Znuny Version: 3.1.11
Real Name: Mikael Kermorgant
Company: Iufm de Paris

Re: system monitoring

Post by artturi »

crythias wrote:A dynamic field isn't a service.
Indeed, but I don't know why the system monitoring used this field. Any idea ?
Mikael
Using ORS::ITSM 3.1.11-3.1.6 on Debian
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: system monitoring

Post by crythias »

I haven't used the monitoring module, but it's a good guess that the module relies on that field to store the information.

(IMO, though, a postmaster filter should be able to adjust the service)
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
artturi
Znuny newbie
Posts: 24
Joined: 11 Nov 2012, 00:14
Znuny Version: 3.1.11
Real Name: Mikael Kermorgant
Company: Iufm de Paris

Re: system monitoring

Post by artturi »

crythias wrote:I haven't used the monitoring module, but it's a good guess that the module relies on that field to store the information.

(IMO, though, a postmaster filter should be able to adjust the service)
You're right, I just read again the system monitoring's module : it has a FreeTextService config field which defaults to '2' and defines the "Free text field index to store service".

I'll have to try your suggestion, thanks again.
Mikael
Using ORS::ITSM 3.1.11-3.1.6 on Debian
artturi
Znuny newbie
Posts: 24
Joined: 11 Nov 2012, 00:14
Znuny Version: 3.1.11
Real Name: Mikael Kermorgant
Company: Iufm de Paris

Re: System monitoring: host recognition, service mapping

Post by artturi »

Sorry to bother you again but could you please elaborate on the postmaster filter idea ?

It's not that clear how I can setup otrs to put the value of TicketFreeKey2 in the right field for Service.
Is that done via the web interface ? If yes, do I have to use X-OTRS-Service or X-OTRS-FollowUp-Service and what in the input fields ?

Regards,
Mikael
Using ORS::ITSM 3.1.11-3.1.6 on Debian
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: System monitoring: host recognition, service mapping

Post by crythias »

artturi wrote:Is that done via the web interface ?
Yes
artturi wrote: If yes, do I have to use X-OTRS-Service or X-OTRS-FollowUp-Service
The first is based upon initial email. The second is a response to an existing ticket.
artturi wrote: what in the input fields
If you use Regular Expressions, you also can use the matched value in () as [***] in the 'Set' action.
What it means is:
Filter Condition:
Header 1 | Body | Service:\s(.*)

Set Email Headers:
Header 1 | X-OTRS-Service | [***]

Note that this doesn't validate the entry. You'll get an error if the mail service isn't exactly as in the database.
To mitigate, you can avoid the wildcards and just make it find
Service: Informatique::Infrastructures::Hébergement
and set
X-OTRS-Service Informatique::Infrastructures::Hébergement
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked