Windows Service Discovery - Service not existing

(Tobias Grossmann) #1

Hi,

ich definded a Service under “windows Service discovery” in “Host an service Parameter” and in the rules.mk there is the right entry.

BUT:

In Wato, when I do a FullScan or TabulaRasa, the service doesn’t appear.

what could it be?

regards, Tobi

#2

can you try
cmk --debug -vvII HOSTNAME as site user ?

(Tobias Grossmann) #3

It’s the same… :frowning:

OMD[monitor]:~/lib/python/cmk_base$ cmk --debug -v -v -II Hostname
Discovering services on: Hostname
Hostname:

  • FETCHING DATA
    [agent] No persisted sections loaded
    [agent] Not using cache (Don’t try it)
    [agent] Execute data source
    [agent] Connecting via TCP to 192.168.99.123:6556 (480.0s timeout)
    [agent] Reading data from agent
    [agent] Write data to cache file /omd/sites/psgmon/tmp/check_mk/cache/Hostname
    [piggyback] No persisted sections loaded
    [piggyback] Execute data source
  • EXECUTING DISCOVERY PLUGINS (1586)
    Trying discovery with: mssql_databases, hp_blade_blades, …
    ps.perf does not support discovery. Skipping it.
    3 df
    1 dotnet_clrmemory
    7 logwatch
    1 mem.win
    1 services.summary
    1 systemtime
    1 uptime
    3 winperf_if
    1 winperf_phydisk
    1 winperf_processor.util
    1 wmi_cpuload
    SUCCESS - Found 21 services

I have another Host, where only one service of two ist listet and found in Wato:

Here ist the Windows Service Discovery:

Here the found Service(only one of two, although everything seems to be right):

(Philipp Näther) #4

Maybe your regex does not fit the service name.

If you run a cmk -d HOST on your server you finde the “services” section. There you can extract the display name you need to enter in the rule. The syntax of this section is “service name / state / display name”.

(Tobias Grossmann) #5

Thanx Philipp!!! :slight_smile:

(Tobias Grossmann) #6

Hi,

one question to this topic:
I still have a service that is not recognized. The display name is “SQL Server Agent (PRODUCT01)”, what could be the problem here?

If I do cmk -d HOST then the following will be displayed:
“SQLAgent $ PRODUCT01 running / auto SQL Server Agent (PRODUCT01)”, but will not be shown with a fullscan.

(Philipp Näther) #7

You probably have to escape the parantheses with a backslash in your regex rule.

1 Like
(Tobias Grossmann) #8

with the backslashes, the discovery failes with this error:

Service discovery failed for this host : Invalid regular expression ‘SQL Server-Agent \(\PRODUCT1\)\’: bogus escape (end of line)

and the same failure with this regex:
SQL Server-Agent \(PRODUCT01)\

How should it be escaped? The regex is this:
"SQL Server-Agent (PRODUCT01)"

(Tobias Grossmann) #9

when i write the regex like this: SQL Server-Agent \\(PRODUCT01)\\
There is no error, but unfortunately a complete scan does not find this service

(Tobias Grossmann) #10

:partying_face:

works now with this expression:
SQL Server-Agent \(PRODUCT01\)

THANX!!!

1 Like
(Tobias Grossmann) #11

But why they changed it from service to display name? I have to change all my settings. :frowning: