How do I delete Business process node origin from other process

I’m trying to set up a few Business processes. As long as I don’t add nodes from other existing processes things are working fine.

Let’s say I have “Process A” with process node “Node A”, which contains a few services. Then I add “Process B”. In “Process B” I add a process node called “Node B” which contains a few services. Under “Process B” I also add the process node “Node C” with an other new process node called “Node X” In “Node C” I also add the existing process node “Node A” from “Process A”.

Process A
  Node A
    Service 1
    Service 2
Process B
  Node B
    Service 3
    Service 4
  Node C
    Node A
      Service 1
      Service 2
    Node X
      Service 5
      Service 6

Then later on when I want to remove the process node “Node A” from “Process B -> Node C”. I then find out that it’s not possible to do that via the GUI. At least I can’t see any way to do it. It looks like this

I can understand that you do not want it to be possible to change the conenten of “Node A” in this case since there might be other Processes using this one. But as you can see the X icon is not there. Of course it could be done in the config files and would have been ok if I just have a few numbers of Processes with very limited number of nodes/services etc. But that’s not the case here.

So I wounder if there is something I have missed or is it a limitation in the Business process GUI?

Please post the config file from your business processes, you will find them (depending on your OS) under /etc/icingaweb2/modules/businessprocess/processes.

Here they are:

$ cat Process\ A.conf 
### Business Process Config File ###
# Owner           : user01
# AddToMenu       : yes
# Statetype       : hard

Node A = server01;Disk Usage / & server01;Disk Usage /home & server01;Disk Usage /tmp & server01;Disk Usage /var & server01;SSH Server & server01;System Load
display 1;Node A;Node A

$ cat Process\ B.conf 
### Business Process Config File ###
# Owner           : user01
# AddToMenu       : yes
# Statetype       : hard

Node B = server02;Disk Usage /home & server02;Disk Usage /tmp & server02;Disk Usage /var & server02;NTPD Process & server02;System Load
display 1;Node B;Node B
Node X = server03;Disk Usage / & server03;Disk Usage /home & server03;Disk Usage /tmp
display 0;Node X;Node X

Node C = @Process A:Node A & Node X
display 1;Node C;Node C

Did you create the files only via GUI or also by manual editing?

I’m not sure if it is allowed to reference to a process from another config file.
Your file references in B.conf to a process from file A.conf.
Try to put everything in one config file and use subprocesses for separation.

All was created from the GUI.

If I do as you suggest I will run in to other issues, even thou not pure technical ones :slight_smile:

The thing here is that I have hundreds of objects to set together into a bunch of “trees”. Many of the “trees” are using “process nodes” from each other so to speak. My thought was to create all the “base process nodes”, the ones not depending on any other “process node”, just services and hosts, into a separate “Process”. That separate “Process” will also be hidden from the normal users by using a specific prefix on it and then use the filter in a role. The when I’m setting up the other “processes” I have only one “source” (Process) to fetch them from.

As far as I can see the GUI allows things to be done the way I do it now. It works fine when it comes to showing states etc. It’s just that I’m not able to remove the “process nodes” from the “Processes”/“Process nodes” where they have been added as “existing nodes” from an other “Process”.
Just to see if you were right I did create more or less the same thing but had everything in the same “Process”, that worked just fine. Really sad that it doesn’t work when you are using “process nodes” from different “processes”.

I guess my explanation above is a little bit messy but I hope you get some kind of picture of what I want to do :slight_smile:

OK, I understand your idea.

I think you have to analyse the source code of the BP module or talk to the developers, because it depends on how the (display) filtering works. If the module is not able to read states from filtered/hidden processes, it will also not show states referencing to them.

I checked the code and did an ugly patch for it. So now I’m able to remove the “process nodes” added from other “processes” :slight_smile:
It looks like there isn’t much activity in the Business Process module -project so I guess not much will happen there now anyway.
Can’t say it really solves the problem since it isn’t doable right out of the box but at least it’s a work around.
Thanks @a1mw for your replies!

My way to work around this wasn’t the prettiest in the world but if someone is interested and maybe want to use it or hopefully make it better the patch is here. It works with at least version 2.2.0 of Icingaweb2-module-businessprocess.

Just put it in let’s say /tmp and execute:
patch -p1 < /tmp/NodeTile.patch.txt

NodeTile.patch.txt (3.9 KB)

That’s it.

Could you please create a PR on GitHub to allow developers provide you with feedback and get this merged upstream? Keeping your local patched fork will break on every update, which adds a burden in contrast to the little effort of a PR :slight_smile:


I’ll most likely do that… Need to make it a little bit less ugly first :smiley:

@mfriedrich So now the pullrequest is done. Don’t know if I did it correct or not but I’m keeping my fingers crossed :smiley:

1 Like