Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

bareos plugins, python won't load

14 views
Skip to first unread message

Serhii Zahuba

unread,
Nov 26, 2024, 3:24:55 AM11/26/24
to bareos-users
I want to use these plugins
https://github.com/bareos/bareos/tree/e54224ff7111de2ca618a3fb2f8a6f8fe0bdfcc4/contrib/dir-plugins/prometheus

but as soon as I add a folder with plugins to the config, I see that in the logs
"bareos-dir (150): dird/dir_plugins.cc:271-0 Load dir plugins
bareos - dir ( 50 ): lib / plugins . cc : 209 - 0 LoadPlugins
bareos-dir (150): dird/dir_plugins.cc:285-0 No plugins loaded"


Can someone help me set this up correctly?

Bruno Friedmann (bruno-at-bareos)

unread,
Nov 26, 2024, 4:59:37 AM11/26/24
to bareos-users
Did you pay attention to the documentation and the config file where you have to uncomment the Plugin line ?


etc/bareos/bareos-dir.d/director/bareos-dir.conf
Director {                            # define myself
  Name = bareos-dir
   # remove comment from "Plugin Directory" to load plugins from specified directory.
  # if "Plugin Names" is defined, only the specified plugins will be loaded,
  # otherwise all director plugins (*-dir.so) from the "Plugin Directory".
  #
  # Plugin Directory = "/ioda/home/bruno/bareos/git/b-at-bareos/core/src/plugins"
  # Plugin Names = ""

Serhii Zahuba

unread,
Nov 26, 2024, 6:00:06 AM11/26/24
to bareos-users
Yes, my config 


File: /etc/bareos/bareos-dir.d/director/bareos-dir.conf

Director {                            # define myself
  Name = bareos-dir
  QueryFile = "/usr/lib/bareos/scripts/query.sql"
  Maximum Concurrent Jobs = 20
  Password = "Sn1LSuj+bpMfG"         
  Messages = Daemon
  Auditing = yes

  Plugin Directory = /etc/bareos/bareos-dir.d/plugins
  Plugin Names = "python3"
}




вівторок, 26 листопада 2024 р. о 11:59:37 UTC+2 Bruno Friedmann (bruno-at-bareos) пише:

Bruno Friedmann (bruno-at-bareos)

unread,
Nov 26, 2024, 7:10:17 AM11/26/24
to bareos-users
I'm not sure why you don't use the default location for plugins in /usr/lib64/bareos/plugins/ ?

Serhii Zahuba

unread,
Nov 26, 2024, 7:25:15 AM11/26/24
to bareos-users



I tried different options. This is my standard folder
 /usr/lib/bareos/plugins/

just tried again - same situation, nothing is passed to the plugin after the task is done



вівторок, 26 листопада 2024 р. о 14:10:17 UTC+2 Bruno Friedmann (bruno-at-bareos) пише:

Bruno Friedmann (bruno-at-bareos)

unread,
Nov 26, 2024, 7:34:00 AM11/26/24
to bareos-users
I'm not sure about what's going on there, no using it myself and hard to tell without the configuration.

Look like if you run the job with a debug level >= 100 you should have the debug message explaining why it failed when pushing to the exporter.

Serhii Zahuba

unread,
Nov 26, 2024, 8:07:39 AM11/26/24
to bareos-users
I found my mistake. It was necessary to install these packages and everything started to work.


apt install bareos-director-python-plugins-common bareos-contrib-tools bareos-contrib-director-python-plugins


вівторок, 26 листопада 2024 р. о 14:34:00 UTC+2 Bruno Friedmann (bruno-at-bareos) пише:
Reply all
Reply to author
Forward
0 new messages