SLA business report - no such service: [name of BP]

59 views
Skip to first unread message

Mariusz Cygan

unread,
Sep 29, 2020, 7:03:42 AM9/29/20
to Thruk
hi,
I am trying to create an SLA report for a business process. The message "no such service: TEST" appears (TEST is the BP name)



What am I doing wrong?
report_settings.png
report_bp.png
BP.png

Sven Nierlein

unread,
Sep 30, 2020, 8:39:14 AM9/30/20
to th...@googlegroups.com, Mariusz Cygan
Hi,

seems like the hosts/services for your business process haven't been exported properly.
Check the BP configuration section: https://thruk.org/documentation/configuration.html#_component-thruk-plugin-bp
And check if you have a save file set and if thats read by your core.

Cheers,
Sven
> --
> You received this message because you are subscribed to the Google Groups "Thruk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to thruk+un...@googlegroups.com <mailto:thruk+un...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/thruk/1124a21f-4dc6-4ba2-8ae4-d79a41ab4ba4n%40googlegroups.com <https://groups.google.com/d/msgid/thruk/1124a21f-4dc6-4ba2-8ae4-d79a41ab4ba4n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Mariusz Cygan

unread,
Nov 9, 2020, 9:12:51 AM11/9/20
to Thruk
hmmm
i created files
ls -1 /etc/thruk_problem/thruk_local.d/
lmd.conf
thruk_bp_generated.cfg
thruk_templates.cfg


my bp conf from thruk_local.conf

# Business Process
<Component Thruk::Plugin::BP>
    # Results will be send back by using the spool folder.
    # This folder should point to the 'check_result_path' of your core.
    #spool_dir = /var/naemon/rw/check_results

    # as alternative to the spool_dir, a livestatus connection can be used
    # to send results to the core.
    #result_backend = sitename

    # Save objects to this file. Content will be overwritten.
    objects_save_file = /etc/thruk/thruk_local.d/thruk_bp_generated.cfg

    # Save format can be either 'nagios' or 'icinga2'.
    #objects_save_format = nagios

    # User maintained file containing templates used for business process services.
    objects_templates_file = /etc/thruk/thruk_local.d/thruk_templates.cfg

    # Command to apply changes to the objects_save_file. If not set and
    # and result_backend is used, the restart will be triggered as external command.
    objects_reload_cmd = sudo /etc/init.d/thruk reload

    # hooks which will be executed before or after saving a single bp.
    #pre_save_cmd   =
    #post_save_cmd  =

    # global hooks
    #post_refresh_cmd =

    # Refresh interval defines how often business processes
    # will be recalculated and refreshed. (in minutes).
    # Set to zero to disable automatic bp calculations.
    #refresh_interval = 1

    # Favorite custom function will be displayed on the 'Type' tab
    # so you don't have to select custom first. Syntax is <name>;<function>
    #favorite_custom_function = echo ; echo_function

    # Worker
    # increase the number of parallel bp calculations
    # Set to zero to disable automatic bp calculations.
    #worker = 5

    # Default filter
    # add filter to all business processes, can be set multiple times
    #default_filter = add_recursive_output_filter

    # default state order from worse to good, use this to override globale default_state_order
    #default_state_order = down, unreachable, ...

    # read_only
    # make all business processes readonly
    #read_only = 1
</Component>

I think the problem is spool_dir - I don't know what to set here.

Thruk only aggregates a few nagios for me. When I set spool_dir, I will give the appropriate permissions, after restart I have

/etc/init.d/thruk start
Starting thruk.....failed
Setting --timeout (timeout) to 15
Setting --timeout (timeout) to 15
Setting --output-document (outputdocument) to -
Setting --output-document (outputdocument) to -
Setting --method (method) to POST
Setting --body-data (bodydata) to ''
DEBUG output created by Wget 1.20.3 on linux-gnu.

Reading HSTS entries from /root/.wget-hsts
URI encoding = ‘UTF-8’
--2020-11-09 15:00:18--  http://localhost/thruk/cgi-bin/remote.cgi?startup
Resolving localhost (localhost)... 127.0.0.1, ::1
Caching localhost => 127.0.0.1 ::1
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
Created socket 3.
Releasing 0x0000564d69b82ea0 (new refcount 1).

---request begin---
POST /thruk/cgi-bin/remote.cgi?startup HTTP/1.1
User-Agent: Wget/1.20.3 (linux-gnu)
Accept: */*
Accept-Encoding: identity
Host: localhost
Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 2

---request end---
[BODY data: '']
HTTP request sent, awaiting response...
---response begin---
HTTP/1.1 500 Internal Server Error
Date: Mon, 09 Nov 2020 14:00:18 GMT
Server: Apache/2.4.41 (Ubuntu)
Content-Length: 606
Connection: close
Content-Type: text/html; charset=iso-8859-1

---response end---
500 Internal Server Error
URI content encoding = ‘iso-8859-1’
Closed fd 3
2020-11-09 15:00:19 ERROR 500: Internal Server Error.

Sven Nierlein

unread,
Nov 9, 2020, 9:21:42 AM11/9/20
to th...@googlegroups.com, Mariusz Cygan
Hi,

On 09.11.20 15:12, Mariusz Cygan wrote:
> objects_reload_cmd = sudo /etc/init.d/thruk reload

This is wrong. The objects_reload_cmd is used to activate the changes made to the object files.
So it should be a command which reloads Naemon or whatever core you use.

Cheers,
Sven

Mariusz Cygan

unread,
Nov 9, 2020, 9:45:43 AM11/9/20
to Thruk
What you gave is one thing. I noticed that when I add /etc/thruk/thruk_local.d/thruk_templates.cfg then thruk doesn't start anymore. The file is standard - I haven't changed anything (such as in /usr/share/thruk/support/thruk_templates.cfg)

Sven Nierlein

unread,
Nov 9, 2020, 9:47:55 AM11/9/20
to th...@googlegroups.com, Mariusz Cygan
On 09.11.20 15:45, Mariusz Cygan wrote:
> What you gave is one thing. I noticed that when I add /etc/thruk/thruk_local.d/thruk_templates.cfg then thruk doesn't start anymore. The file is standard - I haven't changed anything (such as in /usr/share/thruk/support/thruk_templates.cfg)

There should be usually something in the apache error log or in the thruk log.

Mariusz Cygan

unread,
Nov 9, 2020, 9:53:03 AM11/9/20
to Thruk
yeeee
unknow config entry: } in /etc/thruk/thruk_local.d/thruk_templates.cfg:21 at /usr/share/thruk/lib/Thruk/Config.pm line 1219.


file:

define host {
  name                           thruk-bp-template
  address                        Business Process
  active_checks_enabled          0
  check_command                  check_thruk_bp
  check_interval                 1
  check_period                   thruk_24x7
  event_handler_enabled          1
  flap_detection_enabled         1
  max_check_attempts             3
  notification_interval          120
  notification_options           d,u,r
  notification_period            thruk_24x7
  notifications_enabled          1
  process_perf_data              1
  register                       0
  retain_nonstatus_information   1
  retain_status_information      1
  retry_interval                 1
  _WORKER                        local
}
--->>> 21 line <<<---
define service {
Reply all
Reply to author
Forward
0 new messages