OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: HRT on April 25, 2022, 02:19:54 PM

Title: OPNsense Plugin's Directory
Post by: HRT on April 25, 2022, 02:19:54 PM
I've recently moved to opnsense and installed a plugin @zabbix proxy.
In gui it shows installed. I need to replace the plugin with custom one. Where the plugins will be installed ? Directory ?
Title: Re: OPNsense Plugin's Directory
Post by: Patrick M. Hausen on April 25, 2022, 02:33:45 PM
There is no single specific directory. Files are installed over various directories, e.g. a subdirectory of /usr/local/etc for configuration, a subdirectory of /usr/local/bin|sbin|lib for the programs themselves, a subdirectory of /usr/local/www for the web UI, ...

Where will you be getting the replacement plugin and by which method do you intend to install it?
Title: Re: OPNsense Plugin's Directory
Post by: HRT on April 25, 2022, 02:39:51 PM
Need to Enable Remote Commands to Zabbix Proxy.
I've gone through the git repo of opnsense plugins and i was able to find one discussion listed with the above requirement.

I need to implement it. How can i?
Title: Re: OPNsense Plugin's Directory
Post by: Patrick M. Hausen on April 25, 2022, 02:46:40 PM
Clone the git repo, change the code, place changed files on your OPNsense.

After successful test submit pull request on github.
Title: Re: OPNsense Plugin's Directory
Post by: franco on April 25, 2022, 02:49:17 PM
Sounds like this PR? https://github.com/opnsense/plugins/pull/2948


Cheers,
Franco
Title: Re: OPNsense Plugin's Directory
Post by: HRT on April 25, 2022, 02:57:57 PM
May i know at which location i have to change the files...?
Title: Re: OPNsense Plugin's Directory
Post by: Patrick M. Hausen on April 25, 2022, 03:24:49 PM
https://github.com/opnsense/plugins/pull/2948/files#diff-7f112c548797ddedd1b387794c70fd4865461a0f78e8d9ea95a4d785aa9b9b59

/usr/local/opnsense/mvc/app/controllers/OPNsense/Zabbixproxy/forms/general.xml
/usr/local/opnsense/mvc/app/models/OPNsense/Zabbixproxy/General.xml
/usr/local/opnsense/service/templates/OPNsense/Zabbixproxy/zabbix_proxy.conf
Title: Re: OPNsense Plugin's Directory
Post by: HRT on April 26, 2022, 04:04:57 PM
Hi Thank you,

I have followed the steps given, however when i try to enable remote command in the GUI checkbox. that is not getting updated in the config file (/usr/local/etc/zabbix54/zabbix_proxy.conf) after saving the changes.

Referring to github repo PR (https://github.com/opnsense/plugins/pull/2948/files#diff-194afe380850a86a231662054b63e0e216973863449d7e4a0dec3b14452d6ecc) the plugin version suppose to be 1.8v, still we are seeing it as 1.7v. Will that be an issue....?
Title: Re: OPNsense Plugin's Directory
Post by: Patrick M. Hausen on April 26, 2022, 04:18:43 PM
Did you patch all three files, most importantly the template?
Title: Re: OPNsense Plugin's Directory
Post by: HRT on April 26, 2022, 04:59:55 PM
I've patched all the three files. After patching, im able to see EnableRemoteCommand checkbox on GUI but unable to execute remote commands.
Is there any way to fix this issue....?
Title: Re: OPNsense Plugin's Directory
Post by: franco on April 26, 2022, 05:00:57 PM
If only there was an opnsense-patch command to do all this for you :)


Cheers,
Franco
Title: Re: OPNsense Plugin's Directory
Post by: HRT on April 27, 2022, 04:12:19 PM
I've tried patch the files. There was an issue in the zabbix_proxy.conf file which i tried to from github pr (https://github.com/opnsense/plugins/pull/2948).

Finally i was able to figure it out. For reference https://github.com/opnsense/plugins/pull/2948#issuecomment-1111046866

Thanks to all :)