Plugin-helpers not found in wazuh-kibana-app - plugins

I have cloned the Wazuh-Kibana-app source code from https://github.com/wazuh/wazuh-kibana-app
I have made some changes in the styling. So, i am making build of the app by running npm run build but i am getting this error
Command "plugin-helpers" not found
I think it is because in package.json file, it gets like that "plugin-helpers": "node ../../scripts/plugin_helpers" as it is getting out of the directory. So how to resolve this issue?

The Wazuh Kibana plugin uses the Kibana plugin_helpers to build a distributable archive of the plugin, information on how to create a Kibana development installation which is capable of building the Wazuh plugin can be found here: https://github.com/wazuh/wazuh-kibana-app/wiki/Develop-new-features
There is also the option of building the Kibana plugin using the wazuh-packages tools as explained here: https://documentation.wazuh.com/current/development/packaging/generate-wazuh-kibana-app.html , however as of right now this only accepts branches from the official Wazuh plugin.
Let me know if you have any more questions!

Related

How can I run a specific SAPUI5 control sample from Demo Kit locally?

I am looking up the sample for the sap.m.UploadCollection control. I've downloaded and run the sample package locally using the following commands:
npm install
and then
ui5 serve -o index.html
I get the following error in console when navigating to http://localhost:8080/index.html:
2022-08-15 16:56:35.802600 Failed to load component for container container - ModuleError: Failed to resolve dependencies of 'sap/m/sample/UploadCollection/Page.controller.js'
-> 'sap/m/MessageToast.js': failed to load 'sap/m/MessageToast.js' from ./resources/sap/m/MessageToast.js: script load error
ModuleError: Failed to resolve dependencies of 'sap/m/sample/UploadCollection/Page.controller.js'
If I move the Page.contoller.js to a newly created controller folder and move the Page.view.xml to the newly created view folder, then a different error occurs.
How can the downloaded sample project run locally?
Make sure that the downloaded project has the UI5 Tooling part is correctly configured according to the documentation https://sap.github.io/ui5-tooling/pages/Configuration
In your case, the control sap.m.UploadCollection is deprecated since UI5 1.88. So download one of the sap.m.upload.UploadSet samples instead. When downloaded, see which settings are missing in the ui5.yaml config file. E.g. run the below UI5 Tooling commands to add the missing settings:
ui5 use openui5#latest
ui5 add sap.ui.core sap.m sap.ui.layout sap.ui.unified themelib_sap_fiori_3 themelib_sap_horizon
This will at least allow the application to start.

Can't Deploy additionnal packages in a pipeline job

I use a nodejs App in the continuous delivery. Recently I installed a package (puppeteer) which fails to launch because it requires some shared librairies (xlib). This issue is documented (here) and I just need to install additionnal packages.
So I have added in my "BUILD" job additional lines:
#!/bin/bash
npm install
sudo apt-get update
sudo apt-get install -y --fix-missing libx11-6 libx11-xcb1 libxcb1 .......
It installs successfully (couple of errors though), the build job ends with success. (6 upgraded, 133 newly installed, 0 to remove and 55 not upgraded.)
But when I start the App in the "deploy" stage. the file is still missing!
Am I installing this properly?
2020-05-20T08:27:03.83+0000 [APP/PROC/WEB/0] ERR Unhandled Rejection at: Error: Failed to launch the browser process!
2020-05-20T08:27:03.83+0000 [APP/PROC/WEB/0] ERR /home/vcap/deps/0/node_modules/puppeteer/.local-chromium/linux-756035/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
you may want to discuss this problem directly on our public Slack.
Self register here: https://ic-devops-slack-invite.us-south.devops.cloud.ibm.com/
then ask your question here https://ibm-devops-services.slack.com/
I suspect you should add the missing dependencies to your package.json
sorry to hear that registration did not work.
Simply go here https://ic-devops-slack-invite.us-south.devops.cloud.ibm.com/
put your email address
and get your invite.
You should receive an email to register - pick a password of your choice.
Anyhow, I'll check on your issue ASAP
1 - ensure puppeteer dependencies are installed without any errors.
You wrote "It installs successfully (couple of errors though)"
and "55 not upgraded".
Possibly, dependencies are not fully installed or at the required level.
2 - As suggested in previous comments, you are using the pipeline base image.
You may want to build and use your own custom image, an image that would match all your prereqs.
https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-custom_docker_images
Ok got it sorted. data_Henrik was right from start.
What I was doing above in the deployment jobs was useless. It is NOT what will be deployed with the APP.
Instead, you need to deploy "multi buildpack" with (for my APP) the standard nodejs buildpack and also a buildpack specially made to install debian dependencies : https://github.com/cloudfoundry/apt-buildpack. example here: https://ict.swisscom.ch/2019/11/no-root-access-no-debian-packages-on-cloud-foundry-thats-past-with-the-apt-buildpack/
So for my nodejs app it ends up with:
1- a specific apt.yml files containing the list of dependencies (note I had to add a couple more eg libgbm-dev)
2- a specific multi-buildpack.yml containing the list of buildpacks
And that is it. I run the usual build and deploy jobs..

Writing a custom panel plugin for grafana

So I need to write a custom grafana plugin, that works like a funnel. I decided to try and integrate this funnel. Note that it is supposed to get the data from a mysql Server and use it just as a table and not as time series.
So far I read the grafana documentation and then watched this video. In the video a dataFormat is declared in the plugin.json file, however when I checked other working Plugins I didn't see that part written in the plugin.json. The GitHub repos in the video are also gone. I stumbled upon this one though, so then I copied it in the data/plugin directory. I restarted the Server and it was detected but when I tried making a new Panel I got an error saying that it could not be found. I was planning on starting with this example and then working my way towards integrating the funnel part but I can't seem to get it working. Any ideas where to start?
I have reproduced your problem with the same actions and got same error:
Panel plugin not found: myorgid-simple-panel
Just a guess: there is a dependency section in plugin.json file
"dependencies": {
"grafanaVersion": "6.3.x",
"plugins": []
}
My Grafana version is v6.2.5. Isn't this plugin template for future Grafana release (master or developement version)?
I had the same problem with simple-react-panel. To solve it, I ran in the simple-react-panel-master directory :
npm i #grafana/toolkit
npm i #grafana/ui
yarn build
and after I restart grafana service

PredictionIO and Recommendation Template Files

i'm trying to build movie recommendation application using PredictionIO.
i have already using PredictionIO 0.11 on Docker, the issue
that when i run pio build --verbose it's showing:
no engine found. your build might have failed. aborting.
not sure where to puts the recommendation template files?.
any idea?
You need to be sure that you are in the current working directory of your engine I mean you have to execute your pio build --verbose command from the directory where your templates's engine.json file is placed . If this not solves your issue can you please paste the complete error along with template link.

Error creating template PredictionIO

I've created a lot of templates before as by now I was creating the Recommendation following the suggested steps.
$ pio template get PredictionIO/template-scala-parallel-recommendation Foo
Getting this error:
[ERROR] [Template$] Either PredictionIO/template-scala-parallel-universal-recommendation is not a valid GitHub repository, or it does not have any tag. Aborting.
How I fix this and why is this happening?
EDIT:
My Prediction version 0.9.5. Using Ubuntu
It seems that happens when you have made a pio deploy of another template before pio template get, so you have to shutdown the eventserver default port 7070 as:
$ lsof -wni tcp:7070
$ kill -9 PID
This solved the problem.
I had this issue but this google group post had my solution. Basically pio template get is cloning a repository under the covers, so it can have git-related issues.
Check to see if you can access https://api.github.com/ from your web browser. If not, check the google group post.
Also there is no need to do pio template get, just clone it from github. The Universal Recommender is kept up-to-date in its home repo here: https://github.com/actionml/template-scala-parallel-universal-recommendation/tree/v0.3.0
Notice v0.3.0 is nearing release but is not in the template gallery yet.