I dont often USE graylog REST API. I know I can call it ant get for example some configuration parameter.
Now I would like to use API to present the existnig dashboard or saved search. I know they can be found under Legacy department of API browser.
It seems I miss basic concept of how can I reuse the Dashboard or Saved search. I can get the dashboard ID or widget ID, but which API call to use te get some walues outside of those Dashboard/searcheds ?
For example:
If I have a simple dashboard where I have a simple table with 15 hostnames listed in column1 und in column 2 the number of times each host was found, how can I use API to export this data. Can I use API to get list of all hostnames in column 1 and list of values in column 2 ?
I am using OPen Graylog version 3.3.16, it is installed on Centos server.
gsmith thank you for your answer. Yes I was browsing and trying API browser a lot, I saw that you can get dashboard IDs and widget ID.
My problem is I have very little API experience and my quesiton is what can I do outside of graylog -
in API once API returns me all those widget names and their IDs like in your example:
“Windows failed logons”, "count by SourceModule, “Sucesful Logon”…
Is reference to widget ID enought that it will somehow “draw” the widget on some new webpage…I guess much more info is neede for that to succeed?
BTW, in I found some other API call, that returns values of histogram without need for any widget ID.
In the example bellow I use simple query to find all strings of “unknown”. This helps somwhat for my case. Just I have to tinker how to put more complex querys that would equal complex views in such query.
Hello,
I also don’t have that much experience with GL API. Graylog Dashboard is good enough for us so I don’t have to export data around to other web sites, BUT I do use Prometheus enabled on Graylog /w Grafana for metrics.