MrGeneration / Search and Replace Gitlab / Github URLs in Tickets
0 likes
0 forks
2 files
Last active
These snippets allow you to search and replace either just your Gitlab / Github URL or whole group / project URLs if needed. Proceed with care, you cannot undo this operation.
1 | # URLs below can contain project / group URLs, but have to fit as this script |
2 | # does a very simple search and replace. |
3 | # Backup first |
4 | old_gitlab_url = 'https://git.my-old.domain/' |
5 | new_gitlab_url = 'https://git.my-new.domain/' |
6 | |
7 | Ticket.where("preferences LIKE '%gitlab%'").find_in_batches.each do |b| |
8 | b.each do |t| |
9 | next if t.preferences[:gitlab][:issue_links].count.zero? |
MrGeneration / Limit Elasticsearch Memory Usage
0 likes
0 forks
1 files
Last active
Code snippet to create linked storage directories for Zammad. As shown in https://youtu.be/EorlfrN6n60
1 | # /etc/elasticsearch/jvm.options.d/heap-size.conf |
2 | # Below limits Elasticsearch to 1GB memory usage |
3 | # It uses 50% of your hosts memory by default otherwise |
4 | -Xms1g |
5 | -Xmx1g |
MrGeneration / Move Store from DB to File (linked directory)
0 likes
0 forks
2 files
Last active
Code snippet to create linked storage directories for Zammad. As shown in https://youtu.be/EorlfrN6n60
1 | # Below only works if you have no /opt/zammad/storage folder yet and |
2 | # still use the default "DB" setting for the storage_provider |
3 | mkdir /opt/zammad_storage/ |
4 | ln -s /opt/zammad_storage/ /opt/zammad/storage |
5 | chown zammad:zammad /opt/zammad_storage/ |
6 | chmod 700 /opt/zammad_storage/ |
7 | |
8 | # Change to File storage and move said files from DB to File |
9 | # omit 'zammad run' on non package installations |
10 | zammad run rails r "Setting.set('storage_provider', 'File')" |
MrGeneration / Install and Configure Grafana with Zammad
0 likes
0 forks
6 files
Last active
This gist provides contextual copy paste options for Using Grafana with Zammad. Video context to this: https://youtu.be/CdGdKE4hjUU
1 | # As documented on original Grafana documentation: |
2 | # https://grafana.com/docs/grafana/latest/setup-grafana/installation/debian/ |
3 | |
4 | # Add Debian repository |
5 | mkdir -p /etc/apt/keyrings/ |
6 | curl -fsSL https://apt.grafana.com/gpg.key | gpg --dearmor | tee /etc/apt/keyrings/grafana.gpg > /dev/null |
7 | echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | tee -a /etc/apt/sources.list.d/grafana.list |
8 | |
9 | # Install Grafana Enterprise (as suggested) |
10 | apt install grafana-enterprise |
MrGeneration / Debian / Ubuntu Upgrade
0 likes
0 forks
8 files
Last active
This gist provides contextual copy paste options for Distribution upgrades with installed Zammad and PostgreSQL for Debian (10, 11, 12) and Ubuntu (18, 20, 22). Video context to this: https://youtu.be/IXp4VWU27wo
1 | systemctl disable zammad --now |
2 | apt-mark hold zammad |
3 | apt update |
4 | apt upgrade |
5 | |
6 | # Continue with step 2 or 3 depending on your current state |
MrGeneration / Zammad 6.2: Enforce SSL-Verification
0 likes
0 forks
4 files
Last active
With Zammad 6.2 existing configurations for Email channels and i-doit by default have ssl verification disabled. This code snippet activates SSL verification. This change ONLY affects existing, update installations.
1 | # If you've configured "SSL-Verification: true" on previous Zammad-Versions, this setting is going to be a problem. |
2 | # Below turns off SSL verification for all LDAP-Sources. You then can login again and have the time needed to fix the configuration. |
3 | |
4 | LdapSource.all.each do |l| |
5 | l.preferences.merge!("ssl_verify"=>false) |
6 | l.save |
7 | end; |
Newer
Older