Icingaweb2 director own PropertyModifier failure at auto run

Hello Community,

I’ve written an own icingaweb2 director property modifier.
So if I use this modifier manually (that means if I click on my sync rule and then on “trigger run”) the modifier works really nice.

But if I create a job, which runs that import job, and wait until the job triggers the import, I get the following message:
Image

So the question is:
Why the module raise this error only, if I automate the run and works like a charm, if I trigger it manually?

i would suggest, that you reattach the image and upload the sourcecode of the modifier

Thanks @moreamazingnick for your answer, but I do not understand it.
What do you mean with “image”?
And what do you mean with “upload the sourcecode”?

Cheers, Mordecaine

you uploaded an image of “I get the following message:”
but there is no image viewable in your post.

“I’ve written an own icingaweb2 director property modifier.” → please share that otherwise it is not possible to help you.

Ah ok. I understand.
So that’s funny, in my post the picture is displayed after “I get the following message”.

So I’ve created a new picture and uploaded the source Code


.

can you upload the following ouput:

ls -la /usr/share/icingaweb2/modules

As you wished (directorextension is the name of my module):

total 20
drwxr-xr-x. 20 root root 4096 Dec 29 13:28 .
drwxr-xr-x.  7 root root   80 Nov 18 13:06 ..
drwxr-xr-x. 10 root root 4096 Nov 22 15:25 businessprocess
drwxr-xr-x.  4 root root  152 Nov  5 11:49 datagerry
drwxr-xr-x. 11 root root 4096 Nov  5 11:47 director
drwxr-xr-x.  4 root root  108 Feb 14 09:34 directorextension
drwxr-xr-x.  6 root root  124 Nov 19 06:49 doc
drwxr-xr-x.  2 root root   31 Jan  4 14:30 global-dashboards
drwxr-xr-x. 10 root root 4096 Apr 27  2021 grafana
drwxr-xr-x.  6 root root  232 Nov 22 14:33 incubator
drwxr-xr-x.  6 root root  205 Apr 26  2021 ipl
drwxr-xr-x.  8 root root  217 Aug  3  2021 jira
drwxr-xr-x.  4 root root   59 Nov 19 06:49 migrate
drwxr-xr-x.  7 root root  136 Nov 19 06:49 monitoring
drwxr-xr-x.  6 root root  143 Oct 12 07:36 netboximport
drwxr-xr-x.  5 root root  169 Apr 26  2021 reactbundle
drwxr-xr-x.  5 root root   71 Nov 19 06:49 setup
drwxr-xr-x.  5 root root   70 Nov 19 06:49 translation
drwxr-xr-x. 10 root root 4096 Nov 29 09:44 vspheredb

I forked your project and changes some minor details:
[https://github.com/moreamazingnick/ic2-director-modifier]

@moreamazingnick thanks a lot. That worked really nice.

If someone has the same issues then me; you can see the changes in my pull request:

1 Like

don’t forge to
/usr/share/icingaweb2/modules/directorextension# chmod 644 run.php

it fails after unpacking:

root@my:/usr/share/icingaweb2/modules/directorextension# ls -la
total 40
drwxr-xr-x  3 root root  4096 Feb 14 10:35 .
drwxr-xr-x 24 root root  4096 Mar 25 10:11 ..
drwxr-xr-x  3 root root  4096 Feb 14 10:35 library
-rw-r--r--  1 root root 18046 Feb 14 10:35 LICENSE
-rw-r--r--  1 root root   198 Feb 14 10:35 module.info
-rw-r--r--  1 root root   260 Feb 14 10:35 run.php
root@my:/usr/share/icingaweb2/modules/directorextension# chmod 644 run.php
root@my:/usr/share/icingaweb2/modules/directorextension# ls -la
total 40
drwxr-xr-x  3 root root  4096 Feb 14 10:35 .
drwxr-xr-x 24 root root  4096 Mar 25 10:11 ..
drwxr-xr-x  3 root root  4096 Feb 14 10:35 library
-rw-r--r--  1 root root 18046 Feb 14 10:35 LICENSE
-rw-r--r--  1 root root   198 Feb 14 10:35 module.info
-rw-r--r--  1 root root   260 Feb 14 10:35 run.php

and it magically works which makes no sense