profile
viewpoint

awesome-selfhosted/awesome-selfhosted 49670

A list of Free Software network services and web applications which can be hosted locally. Selfhosting is the process of hosting and managing applications instead of renting from Software-as-a-Service providers

ELLIOTTCABLE/git-blog 108

Ridiculously minimalist blogware - write your posts in $EDITOR, then `git-push blog master`. Boom, new posts published.

Kiwi/clyde 64

Next-generation libalpm/makepkg wrapper.

nogweii/chronic 21

Chronic is a pure Ruby natural language date parser.

nogweii/bin 9

~/bin/ and all it's glory!

grundprinzip/slimtimercli 6

A SlimTimer commandline interface

nogweii/arson 5

A CLI interface to the Arch Linux User Repository

nogweii/aur-packages 1

I am an AUR package maintainer. See my packages!

nogweii/aethernet 0

My salt configurations for all of my servers. Configuration management redux, again.

startedchrissimpkins/Crunch

started time in 2 days

startedjedisct1/doh-server

started time in 2 days

startedmasaruhoshi/uptimerobot-prometheus-exporter

started time in 3 days

startedFriendlyCaptcha/friendly-pow

started time in 3 days

issue openedansible-collections/community.grafana

JSON Decode Error when grafana_url ends with trailing slash

SUMMARY

When crafting a URL for Grafana's API, the grafana_datasource module (and maybe others, I didn't check them) appends two strings together, the passed in grafana_url and the appropriate endpoint. This results in a URL like "...com//api/..." Grafana is picky about matching routes, so returns an error page in HTML, not JSON as the module expects. It attempts to parse the page as JSON which results in a JSONDecodeError.

ISSUE TYPE
  • Bug Report
  • Feature Request

A bit of both, I think.

COMPONENT NAME

<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->

ANSIBLE VERSION

<!--- Paste verbatim output from "ansible --version" between quotes -->

ansible 2.10.2
  config file = /home/user/code/homelab/ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.8.6 (default, Sep 30 2020, 04:00:38) [GCC 10.2.0]
CONFIGURATION

<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->

DEPRECATION_WARNINGS(/home/user/code/homelab/ansible.cfg) = False
DIFF_ALWAYS(/home/user/code/homelab/ansible.cfg) = True
LOCALHOST_WARNING(/home/user/code/homelab/ansible.cfg) = False
OS / ENVIRONMENT

Arch Linux, targeting itself. Everything is installed from the distribution packages.

STEPS TO REPRODUCE

Simply running this playbook should trigger the error:

---
- name: create a datasource in grafana to read metrics
  community.grafana.grafana_datasource:
    name: "{{ item }}"
    grafana_url: "https://grafana.example.com/" # NB: the trailing slash
    grafana_api_key: "{{ grafana_admin_api_key }}"
    org_id: "1"
    ds_type: "influxdb"
    ds_url: "http://influx:8086"
    database: "telegraf"
    time_interval: ">10s"
    user: grafana
    password: "{{ influxdb_users_grafana }}"
EXPECTED RESULTS

<!--- Describe what you expected to happen when running the steps above --> Not a python exception, but either it gracefully handling it or returning a human friendly error message rather than a screen full of red error text. 😄

ACTUAL RESULTS

<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->

<!--- Paste verbatim command output between quotes -->

"module_stderr": "Traceback (most recent call last):\n  File \"/home/user/.ansible/tmp/ansible-tmp-1603857202.7836478-2983891-108174010981857/AnsiballZ_grafana_datasource.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/home/user/.ansible/tmp/ansible-tmp-1603857202.7836478-2983891-108174010981857/AnsiballZ_grafana_datasource.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/user/.ansible/tmp/ansible-tmp-1603857202.7836478-2983891-108174010981857/AnsiballZ_grafana_datasource.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.community.grafana.plugins.modules.grafana_datasource', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib/python3.8/runpy.py\", line 207, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_community.grafana.grafana_datasource_payload_oszg32vj/ansible_community.grafana.grafana_datasource_payload.zip/ansible_collections/community/grafana/plugins/modules/grafana_datasource.py\", line 752, in <module>\n  File \"/tmp/ansible_community.grafana.grafana_datasource_payload_oszg32vj/ansible_community.grafana.grafana_datasource_payload.zip/ansible_collections/community/grafana/plugins/modules/grafana_datasource.py\", line 726, in main\n  File \"/tmp/ansible_community.grafana.grafana_datasource_payload_oszg32vj/ansible_community.grafana.grafana_datasource_payload.zip/ansible_collections/community/grafana/plugins/modules/grafana_datasource.py\", line 628, in datasource_by_name\n  File \"/tmp/ansible_community.grafana.grafana_datasource_payload_oszg32vj/ansible_community.grafana.grafana_datasource_payload.zip/ansible_collections/community/grafana/plugins/modules/grafana_datasource.py\", line 617, in _send_request\n  File \"/tmp/ansible_community.grafana.grafana_datasource_payload_oszg32vj/ansible_community.grafana.grafana_datasource_payload.zip/ansible/module_utils/basic.py\", line 2136, in from_json\n  File \"/usr/lib/python3.8/json/__init__.py\", line 357, in loads\n    return _default_decoder.decode(s)\n  File \"/usr/lib/python3.8/json/decoder.py\", line 337, in decode\n    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n  File \"/usr/lib/python3.8/json/decoder.py\", line 355, in raw_decode\n    raise JSONDecodeError(\"Expecting value\", s, err.value) from None\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n

created time in 4 days

create barnchnogweii/lobsters

branch : feature/show-moderation-reason-on-dupe

created branch time in 4 days

startedcrowdsecurity/crowdsec

started time in 4 days

startedeafer/rdrview

started time in 4 days

starteddw/mitogen

started time in 4 days

startedwalles/pytest-avoidance

started time in 4 days

startedMadRabbit/halmak

started time in 4 days

fork nogweii/lobsters

Computing-focused community centered around link aggregation and discussion

https://lobste.rs

fork in 5 days

issue commentlobsters/lobsters

Not clear why a deleted story can't be submitted

It sounds like one way to solve this would be adding an error during validation that says something like "This story was removed by the mods for #{moderation.reason}". Does that sound like a good resolution to this?

This sounds like a good first start, and I'd like to take a stab at it this week/weekend if no one else is planning on it.

pushcx

comment created time in 5 days

startedbellard/quickjs

started time in 6 days

issue commentmingrammer/diagrams

Add emoji support

The problem stems from what font dot uses to render text and which fonts are installed on your system. For @egorsmkv, those showed up because it picked up the Symbola font. I don't know how it decides the font to use, but it might be configurable using fontconfig.

xyzst

comment created time in 6 days

startedsplunk/attack_data

started time in 6 days

startedPyratLabs/DeApexer

started time in 6 days

startedcycloidio/inframap

started time in 6 days

startedCloud-Architects/cloudiscovery

started time in 6 days

startedmingrammer/diagrams

started time in 6 days

startedPyratLabs/ansible-role-k3s

started time in 6 days

startedPyratLabs/ansible-role-k3s

started time in 6 days

startedscenic-views/scenic

started time in 6 days

startednucleic/enaml

started time in 6 days

startedcsu/export-saved-reddit

started time in 6 days

startedExternalizable/bongo.cat

started time in 7 days

startedtheryangeary/choose

started time in 7 days

started30-seconds/30-seconds-of-python

started time in 9 days

startedlearnbyexample/learn_ruby_oneliners

started time in 9 days

startedlearnbyexample/command_help

started time in 9 days

startediantrich/aftership-card

started time in 11 days

startedjessfraz/ship

started time in 11 days

startedkylelogue/mustard-ui

started time in 11 days

startedoutadoc/portal-fortunes

started time in 12 days

startedoutadoc/home-slide-android

started time in 12 days

startedd3m0nz/opnsense_exporter

started time in 13 days

startedmike-seagull/backup_creeper

started time in 13 days

startedPrevole/ansible-opnsense-collection

started time in 13 days

startedkradalby/terraform-provider-opnsense

started time in 13 days

startedjoshdick/onedark.vim

started time in 13 days

startednroi/flexo

started time in 13 days

startedromkatv/powerlevel10k

started time in 13 days

startedLiCybora/NanoDefenderFirefox

started time in 13 days

startedmtreinish/pyopnsense

started time in 14 days

startednbuchwitz/check_opnsense

started time in 14 days

startedm0ngr31/jellyamp

started time in 15 days

startedaristocratos/bpytop

started time in 15 days

startedDannyBen/victor

started time in 15 days

startednguyenquangminh0711/ruby_jard

started time in 15 days

startedankane/informers

started time in 15 days

starteddotenv-linter/dotenv-linter

started time in 15 days

startedadelarsq/vim-emoji-icon-theme

started time in 16 days

startedkyazdani42/nvim-web-devicons

started time in 16 days

startedtjdevries/colorbuddy.nvim

started time in 16 days

startedglepnir/spaceline.vim

started time in 16 days

startednorcalli/nvim-colorizer.lua

started time in 16 days

startedmregni/EmbyStat

started time in 17 days

startedcorecode/dma

started time in 17 days

startedhashicorp/boundary

started time in 17 days

startedWeilbyte/PVEDiscordDark

started time in 17 days

startedgeoacumen/geoacumen-country

started time in 17 days

startedbastienwirtz/aqi_watcher

started time in 17 days

startedout-of-cheese-error/the-way

started time in 18 days

startedclaytonjn/hass-circadian_lighting

started time in 18 days

startedTimeToogo/tunshell

started time in 18 days

startedThristhart/30s

started time in 18 days

startedzserge/awfice

started time in 19 days

startedsergeykish/live-pages

started time in 19 days

startedblack7375/Breeze-Cursors-for-Windows

started time in 19 days

startedshowmewebcam/showmewebcam

started time in 20 days

startedfneu/breezy

started time in 20 days

startedRaitaroH/BreezeDarkColorSchemes

started time in 20 days

startedRaitaroH/YouTube-DeepDark

started time in 20 days

startedRaitaroH/LibreOffice-BreezeDark

started time in 20 days

starteddeluan/navidrome

started time in 20 days

startedfilebrowser/filebrowser

started time in 20 days

startedcactus/go-camo

started time in 20 days

startedtuskyapp/Tusky

started time in 20 days

startedrevk/QR

started time in 20 days

startedtheforeman/journald-logger

started time in 20 days

startedbtolfa/pipe-ssh-pageant

started time in 20 days

startedbenpye/wsl-ssh-pageant

started time in 20 days

startedcuviper/ssh-pageant

started time in 20 days

startedrupor-github/wsl-ssh-agent

started time in 20 days

startedrenovatebot/renovate

started time in 20 days

startedtimothybrooks/hdr-plus

started time in 21 days

starteddstotijn/hetty

started time in 21 days

startedTotallyNotChase/glitch-this

started time in 22 days

startedaaronpk/micropub.rocks

started time in 22 days

startedsnarfed/bridgy-fed

started time in 22 days

startedaaronpk/websub.rocks

started time in 22 days

startedindieweb/link_rel_parser-ruby

started time in 22 days

startedShoshinNikita/boltBrowser

started time in 22 days

startedGhostPack/Seatbelt

started time in 23 days

startedcapnmidnight/Calla

started time in 24 days

startedLuminosoInsight/ordered-set

started time in 24 days

startedtypeddjango/awesome-python-typing

started time in 24 days

startedhdm/mac-ages

started time in 24 days

startedatredispartners/flamingo

started time in 24 days

more