Fiscit Remote Monitoring / Grafana bugs

* Listen_IP config parameter seems to be ignored by the mod * Datasources are hardcoded which is pretty bad if someone (like me) decides to use dashoards in their own grafana installation. In that case a datasource name and/or ID (which is kinda even worse) mismatch occurs and you must search & replace all the datasource mentions in all the dashboards. A recommended approach is to use variables to select and template the datasource names into PromQL/SQL queries. * frmcache seems to be misconfigured: there are no PG_* settings, so it cannot connect to the DB, also it cannot use standard pq library envvars to connect automagically. Need to specify -pghost $PG_HOST -pgport $PG_PORT -pguser $PG_USER -pgpassword $PG_PASSWORD -pgdb $PG_DB args in the init script. * frmcache seems to be unable to create a database when applying migrations (just for me?), which is easily fixed by adding a POSTGRES_DB envvar to the postgresql service. The missing depends_on is already added though. * No dockerfiles, no cache, everything is being compiled on every launch by init scripts instead of only on code update. And then there are dashboards: * There are sort of harmless but still annoying errors regarding legacy queries. * Drop pod dashboard didn't work or displayed only collected pods. AFAIK the error was due to the SQL query case. And it was probably a legacy query thing since I was not able to see the real query in the UI (!) unless I open a Query Inspector or go to the dashboard JSON. * I've had to modify some queries to make Grafana visualizations and variables work. Unfortunately I don't remember which ones, but there's always the good old 'compare versions' thing. Not all dashboards were checked, but I see a lot of broken stuff (at least half of which was broken by me, no doubt). P. S. I am willing to submit PRs later. P. P. S. Yes, this is basically what I do for a living, so please try to forgive me if I'm too hard on authors and contributors 😰
8 Replies
featheredtoast
featheredtoast•2w ago
* listen IP: this would be an issue to report to FRM. * datasources: would be great to have them templated. I haven't bothered as there has never been a need until now. * cache: PG_* are set from env vars only in 12 factor app style. No args are supported. * postgres: I've never seen this issue. Are you using something other than the default db? This works for everyone else and the behavior is documented on the postgres docker page:
$ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres The default postgres user and database are created in the entrypoint with initdb.
* Dockerfiles: I'm amenable to adding and uploading these, but understand there's a disadvantage too: more caching = yet another variable for new users unfamiliar with docker to get hung up on why something wont' update. I already had someone complain about things not updating because they didn't do a docker compose down. Ensuring they understand that they also need to pull is yet another barrier, however small. This saves you maybe 10 seconds on boot so it hasn't been a big priority 🤷 * Drop pods, sure I can address this. * Other dashboards: I've made fixes for supporting the latest FRM versions with the release of 1.0. "other various dashboards are broken" isn't an actionable report, but as a professional you should know this already. I'd appreciate you omit this piece of feedback until you can report these with any amount of detail. It's possible you have an old version of the stack.
DarthPorisius
DarthPorisius•2w ago
Listen_IP is legacy and can be removed from the config. It was something from the pre-C++ Rewrite of the mod as it was used for the cpp-httplib side used by BlueprintHTTPServer. Now uWebsockets handles both HTTP and WS requests and doesn't have any use for it.
No description
featheredtoast
featheredtoast•21h ago
I checked drop pods and they're working fine for me. Update here adding a retry for initial pg connection seems sound. I'm also moving to build from dockerfiles Templates aren't clear how to do without breaking the bootstrapping process, exporting json to a templated dash means you could manually add the json to an existing grafana but it won't automatically import to my preconfigured one dockerfiles and images are up now. dashboards up on grafana now and added an export to the repo. I hope this allows you to compose all the things together.
ChaoticUnreal
ChaoticUnreal•19h ago
Not the original reporter but it's there an easy way to update grafana dashboards since I can't use your full stack
featheredtoast
featheredtoast•18h ago
@ChaoticUnreal I have no idea.... can you delete + re-import the dashboards? how did you import them to begin with?
ChaoticUnreal
ChaoticUnreal•18h ago
From the json (or whatever format) but had to edit them to have the right uids for the data sources So probably Mostly wasn't sure if there was a better way
featheredtoast
featheredtoast•18h ago
oh, yeah you'll benefit then too I can't post links, but they're under public-dashboards folder in the repository those are the publically-shareable exports of all the dashboards I've built, you can import, rename, update IDs, and link to your existing datasources freely with those; downside is you'll have to do it manually. as far as I can tell there's no good way to reuse the same dashboard templates between manual import and auto-import I've uploaded them to the repo and you can also search for them in grafana's main page if you prefer that
ChaoticUnreal
ChaoticUnreal•18h ago
Looking at the repo looks like you updated them 15 days ago are there newer ones? Can also switch back to the FRM discord
Want results from more Discord servers?
Add your server