2

I have been getting this Lack of free swap space on Zabbix server on my aws instance via zabbix monitoring.

I am thinking of creating say 2 Gb of swap space. Do I risk loosing or interfering with anything since it is a live server (being used).

I found some steps that I intend to use as listed below:

  1. sudo dd if=/dev/zero of=/var/swapfile bs=1M count=2048
  2. sudo chmod 600 /var/swapfile
  3. sudo mkswap /var/swapfile
  4. echo /var/swapfile none swap defaults 0 0 | sudo tee -a /etc/fstab
  5. sudo swapon -a

Anyone warn me if I am taking a risk with live server? Thank you.

Bob Mwenda
  • 21
  • 1
  • 2

1 Answers1

6

Monitoring tells you what it is configured to tell. In this case, do you need swap? If you need it, configure it. If you do not need it, adjust monitoring not to complain about the lack of swap.

Do not modify your systems just because the default settings of a monitoring system complain about something. Understand it and make sure the expectations of the monitoring system match your expectations.

Richlv
  • 2,334
  • 1
  • 13
  • 17