Scripting in Grafana - grafana

I am a beginner in Grafana and I am trying to go through all the tutorial and documentation from Grafana.net, however, I am having trouble learning how to do scripted dashboard on Grafana, there is a documentation page on the site but it is very brief and I do not know how to proceed. Could anyone share with me a useful site for learning how to build scripted Dashboard on Grafana (especially using InfluxDB as the DB server).

As per my understanding :
In the folder grafana install folder under public/dashboards/ there is a file named scripted.js
you have to modify scripted.js file.
In Brief :
First you need to install GRAFANA (centos or ubuntu anything)
then Configure the grafana Example
path : /etc/yum.repos.d/grafana.repo
configuration and installation link :
http://docs.grafana.org/installation/rpm/
now you can check your grafana related file using grep or find commands and check required path.
then
In the folder grafana install folder under public/dashboards/ there is a file named scripted.js
you have to modify scripted.js file.
You can take help of below given site :
https://github.com/grafana/grafana/blob/master/docs/sources/reference/scripting.md

Related

Where are the libraries for H5P getting stored in Moodle container

I am running a Moodle Docker container. It is running at localhost:8080. There I installed H5P Interactive Contents from https://moodle.org/plugins/mod_hvp in Site Administration>Plugins>Install plugin. Inside the moodle container (one can go there by docker exec /bin/bash), I can find the hop_mod in the /mod directory.
Now I am installing (with Edit Mode enabled in Moodle) different libraries of H5P Content (e.g., Interactive Video, Multiple Choice, Quiz, etc.) in Moodle like this:
Now I just wanna check where these libraries are getting saved. First, I thought they would be somewhere in /mod/hvp/ inside my moodle container. However, I could not find them. In some sources I found that files in Moodle get saved in /moodledata/filedir inside moodle container. I wanted to make sure if the libraries also get saved there. As the files are saved with their named hashed in /moodledata/filedir and there are literally thousands of folders here, it is impossible to check for the libraries or any file I want to check here.

How to get install path in YAML

I installed keycloak in Redhat openshift and the yaml file link is below:
https://raw.githubusercontent.com/keycloak/keycloak-quickstarts/latest/openshift-examples/keycloak.yaml
what I am confused is that I can not find the full path where the keycloak installed in pod.
Can anyone help me out to explain where it config it the yaml?
Please have a look at the keycloak image manifest to get more details on where exactly the keycloak is getting installed within container.
https://quay.io/repository/keycloak/keycloak/manifest/sha256:64fb81886fde61dee55091e6033481fa5ccdac62ae30a4fd29b54eb5e97df6a9
As per what i see from manifest JBOSS_HOME points to below location in manifest
JBOSS_HOME=/opt/jboss/keycloak
Also, i think you are trying to find the install location in the yaml file but there is no reference to install path in yaml file using env variables as far as i could see which might override the location defined in the Docker image file. Hope this helps

Why is the gcloud sdk's deploy command looking at my home directory for files?

I'm attempting to deploy a python server to Google App Engine.
I'm trying to use the gcloud sdk to do so.
It appears the command I need to use is gcloud app deploy.
I get the following error:
me#mymachine:~/development/some-app/backend$ gcloud app deploy
ERROR: (gcloud.app.deploy) Error Response: [3] The directory [~/.config/google-chrome/Default/Cache] has too many files (greater than 1000).
I had to add ~/.config to my .gcloudignore to get past this error.
Why was it looking there at all?
The full repo of my project is public but I believe I've included the relevant portion.
I looked at your linked repo and there aren't any yaml files. As far as I know, a GAE project needs an app.yaml file because that file tells GAE what your runtime is so that GAE knows how to deploy/run your code. In fact, according to the gcloud app deploy documentation, if you don't specify any yaml files to be deployed, it will default to app.yaml in the current directory. If it can't find any in the current directory, it will try to build one.
Your repo also shows you have a Dockerfile. GAE documentation for custom runtimes says ...Custom runtimes let you build apps that run in an environment defined by a Dockerfile... In the app.yaml file for custom runtimes, you will have the following entry
runtime: custom
env: flex
Since you don't have an app.yaml file and you have a Docker file in which you are downloading and installing Chrome, it seems to me that gcloud app deploy is trying to infer your runtime and this has led to it executing some or all of the contents of the Dockerfile before it attempts to then push it to Production. This is what is making it take a peek at the config file on your local machine till you explicitly tell it to ignore it. To be clear, I'm not 100% sure of this, just trying to see if I can draw a logical conclusion.
My suggestion would be to create an app.yaml file and specify a custom runtime. Or just use the python runtime with flex

neo4j apoc import/export not working. How to modify the neo4j.conf file?

I am a beginner user of neo4j. I am trying to export a simple graph in .graphml format in order to be able to visualize it in Gephi. Even though the apoc procedures seem to be successfully installed, a command like CALL apoc.export.graphml.all("C:/path/to/folder/file.graphml",{}) generates the following error:
apoc.export.graphml.all is not available due to having restricted
access rights, check configuration*.
I tried to modify the neo4j.conf file (which I copied and pasted into the conf folder of the default graph database folder in Documents) adding dbms.security.procedures.unrestricted=apoc, shutting down and restarting neo4j with no success.
I am using Windows 10 and I have installed the NEO4J 3.2.1 Community Edition version (installer version). Any help appreciated.
I tried to modify the "neo4j.conf" file (which I copied and pasted
into the conf folder of the default graph database folder in
Documents) adding "dbms.security.procedures.unrestricted=apoc.*",
shutting down and restarting neo4j with no success.
According the documentation, the correct file location of neo4j.conf file for Windows installations is %APPDATA%\Neo4j Community Edition\neo4j.conf.
So edit the above file and put into it the line dbms.security.procedures.unrestricted=apoc.*".

Installing Grafana Panel Plugin

I am attempting to install the piechart plugin on my Grafana v2.5 environment and no matter what I do the panel does now show as an option in the UI. I cloned the repository to /var/lib/grafana/plugins as documented and restarted the grafana-server service and that did not work. I also tried putting the plugin in a separate directory and referencing it as:
[plugin.piechart]
path = /home/usr/share/grafana/panel-plugin-piechart
I made sure that the grafana service has ownership of the plugin directory, and checked the grafana logs but it did not have useful information.
https://github.com/grafana/panel-plugin-piechart
You will need Grafana master based on the release date of the plugin.
Confirmed here - https://groups.io/g/grafana/message/1181
You definitely need to upgrade your Grafana. This is very seamless operation - just install a new package on top of the old one. You can back up through copy /var/lib/grafana/grafana.db for safety before doing that.
Check the permission of the files in plugins directory,
all the files of the plugin should be in its directory, i.e. every plugin should be contained its own directory
if the plugins directory has any package.json file or webpack.config.js available outside then also your plugins will fail to load.
the above mentioned files are part of every panel plugins and should only exist in their respective directories.
execute "chown" and set the owner to grafana:grafana group:user
(by default root is the owner of the files and directories.)
Are you running Grafana as a standalone service or in a docker container?
If running as a service directly you can visit the Grafana community page and find the plugin installation instructions from there.
https://grafana.com/grafana/plugins/grafana-piechart-panel
(Verified on Grafana version 6.x.x & 7)
If running within a dockerized service you need to copy the plugin in your workspace and specify the directory within the docker image so it can locate the plugin from there. You can do this by using the environment variables and mention these within a docker-compose file
GF_PATHS_PLUGINS /var/lib/grafana/plugins
https://grafana.com/docs/grafana/latest/installation/configure-docker/
I have been able to work with both these options