Calculate prometheus disk space

Posted on Mon 01 August 2022 in Network • Tagged with pxe, howto, linux, notepad, work • 1 min read

Calculate

needed_disk_space = retention_time_seconds * ingested_samples_per_second * bytes_per_sample

Source

30 days (secs): 2592000
ingested_samples_per_second: rate(prometheus_tsdb_head_samples_appended_total[2h])
bytes_per_sample: rate(prometheus_tsdb_compaction_chunk_size_bytes_sum[2h]) / rate(prometheus_tsdb_compaction_chunk_samples_sum …

Continue reading

Enable PXE boot on Mellanox ConnectX

Posted on Fri 08 July 2022 in Network • Tagged with pxe, howto, linux, notepad, work • 1 min read

MFT Tool

https://www.mellanox.com/downloads/MFT/mft-4.20.1-14-x86_64-deb.tgz

MD5SUM: 097c0874bd33fbff2f7fd21699c843c5
SHA256: 4b1b4a8e2eba2369317c0e504ef09b1dc0c60119ddaead45fd26b0c36434635c
wget https://www.mellanox.com/downloads/MFT/mft-4.20.1-14-x86_64-deb.tgz
tar zxvf mft-4.20.1-14-x86_64-deb.tgz
mft-*-deb/install.sh

Enable UEFI and PXE boot

mst start
for …

Continue reading

ceph - down pgs after lost osd

Posted on Wed 19 August 2020 in Ceph • Tagged with ceph, osd, pgs, howto, linux, notepad, work • 1 min read

Initial situation / Issue

  • pool size = 1 (Don't ask why)
  • lost/crashed osd
  • pgs down/incomplete

Verify

$ ceph pg <id> query
{
    "snap_trimq": "[]",
    "snap_trimq_len": 0,
    "state": "active+clean",
    "epoch": 348,
    "acting": [
        87
    ],
[...]
         "blocked": "peering is blocked due to down osds",
         "down_osds_we_would_probe": [
               60],
         "peering_blocked_by …

Continue reading

ceph - logging into graylog

Posted on Wed 19 August 2020 in Ceph • Tagged with ceph, graylog, howto, linux, notepad, work • 1 min read

ceph logging into graylog

graylog.conf

rest_listen_uri = http://x.x.x.x:12901/

/etc/ceph/ceph.conf

mon_cluster_log_to_graylog = true
mon_cluster_log_to_graylog_host = x.x.x.x
mon_cluster_log_to_graylog_port = 12201

ceph - rbd namespaces

Posted on Mon 14 October 2019 in Ceph • Tagged with ceph, rbd, namespace, radosgw, howto, linux, notepad, work • 1 min read

Fun with rbd namespaces

cli

# rbd --namespace $namespace $command $pool/$image
# rbd $command $pool/$namespace/$image

create

# rbd namespace ls --format=json
[]
# rbd namespace create --namespace newns1
# rbd namespace ls --format=json
[{"name":"newns1"}]
# rbd create --namespace newns1 newrbd1 --size 1G
# rbd ls --long
# rbd --namespace newns1 ls --long
NAME …

Continue reading

gpg - export all (private-)keys

Posted on Sat 04 May 2019 in Linux • Tagged with howto, linux, notepad, gpg • 1 min read

GPG export

for keyid in $( gpg -K --with-colons | grep ^sec | cut -d: -f5 ); do \
  [[ -d ~/.gnupg/export ]] || mkdir ~/.gnupg/export; \
  gpg --export -a --export-options export-minimal --output ~/.gnupg/export/${keyid}.pub $keyid; \
  gpg --export-secret-keys -a --output ~/.gnupg/export/${keyid}.key $keyid;
done

For a public key without signatures use --export-options export-minimal …


Continue reading

cryptsetup - remote unlocking over ssh

Posted on Fri 03 May 2019 in Linux • Tagged with howto, linux, notepad, work, initrd • 1 min read

Notes

Only vaild for Ubuntu/Debian!

Package(s)

  • dropbear-initramfs

Configuration

ip config

# egrep "(DEVICE|IP)=" /etc/initramfs-tools/initramfs.conf 
DEVICE=enp3s0f0
IP=10.12.13.11::10.12.13.1:255.255.255.0::enp3s0f0:off
IP=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:
   <device>:<autoconf>:<dns0-ip>:<dns1-ip>:<ntp0-ip>

ssh-keys

# cat /etc …

Continue reading

Quickstart guide with kolla-ansible (for rocky)

Posted on Fri 15 February 2019 in openstack • Tagged with openstack, kolla, ansible, howto, linux, notepad, work • 2 min read

Requirements

  • kolla-ansible (testet with 7.0.1)
  • ansible (testet with 2.6.13)
  • epel-release (for centos)
  • python-pip

And some magic:

  • vagrant
  • vagrant-libvirt plugin
  • vagrant config

Quickstart

We will run all commands on our admin-node (vagrant ssh kolla-admin)

sudo yum install -y epel-release
sudo yum install -y python2-pip
sudo …

Continue reading

ceph/rgw metasearch with elasticsearch 6.x

Posted on Tue 29 January 2019 in Ceph • Tagged with ceph, elasticsearch, radosgw, howto, linux, notepad, work • 1 min read

Houston, we have a problem

Since elasticsearch 6.x requires to provide the correct content-type for a request and the elastic sync module has no option for the content-type....we stucked at elastic 5.x

Error message

{"error":"Content-Type header [] is not supported","status":406}

strace log

strace -e network …

Continue reading

ceph nautilus - all new [wip]

Posted on Wed 02 January 2019 in Ceph • Tagged with ceph, notepad, nautilus • 1 min read

The Nautilus (14.x.x) release is scheduled for Feb 2019! 9 months after Mimic (13.x.x)

So what's new in ceph nautilus?

There are some new feature and updates:


Continue reading