{"id":363,"date":"2023-08-03T05:40:40","date_gmt":"2023-08-03T05:40:40","guid":{"rendered":"http:\/\/192.168.0.142\/?p=363"},"modified":"2023-08-03T10:04:39","modified_gmt":"2023-08-03T10:04:39","slug":"installation-of-victoriametrics-on-ubuntu-22-04","status":"publish","type":"post","link":"http:\/\/192.168.0.142\/installation-of-victoriametrics-on-ubuntu-22-04\/","title":{"rendered":"Installation of VictoriaMetrics on Ubuntu 22.04"},"content":{"rendered":"\n
VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and time series database.<\/p>\n\n\n\n
It supports the Prometheus pull model and various push protocols (Graphite, InfluxDB, OpenTSDB) for data ingestion. It is optimized for storage with high-latency IO, low IOPS and time series with high churn rate.<\/p>\n\n\n\n
For reading the data and evaluating alerting rules, VictoriaMetrics supports the PromQL, MetricsQL and Graphite query languages. VictoriaMetrics Single is fully autonomous and can be used as a long-term storage for time series.<\/p>\n\n\n\n
VictoriaMetrics Single can easily handle 10M+ of active time series on a single instance. It is perfect for small and medium environments.<\/p>\n\n\n\n
Update package index files<\/strong><\/p>\n\n\n\n Create a download directory<\/strong><\/p>\n\n\n\n Get VictoriaMetrics<\/strong><\/p>\n\n\n\n Extract package contents<\/strong><\/p>\n\n\n\n Move VictoriaMetrics single binary to bin folder<\/strong><\/p>\n\n\n\n Create a directory to hold the PID file<\/strong><\/p>\n\n\n\n Create service for VictoriaMetrics<\/strong><\/p>\n\n\n\n Set the file limits for the service<\/strong><\/p>\n\n\n\n Enter below contents in the file<\/strong><\/p>\n\n\n\n Enable VictoriaMetrics service<\/strong><\/p>\n\n\n\n Start VictoriaMetrics service<\/strong><\/p>\n\n\n\n Check the status of VictoriaMetrics service<\/strong><\/p>\n\n\n\n Terminal output for reference<\/strong><\/p>\n\n\n\n VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and time series database. It supports the Prometheus pull model and various push protocols (Graphite, InfluxDB, OpenTSDB) for data ingestion. It is optimized for storage with high-latency IO, low IOPS and time series with high churn rate. For reading the data and evaluating alerting rules, VictoriaMetrics … Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":426,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[30],"_links":{"self":[{"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/posts\/363"}],"collection":[{"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/comments?post=363"}],"version-history":[{"count":20,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/posts\/363\/revisions"}],"predecessor-version":[{"id":499,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/posts\/363\/revisions\/499"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/media\/426"}],"wp:attachment":[{"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/media?parent=363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/categories?post=363"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/tags?post=363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}sudo apt update<\/code><\/pre>\n\n\n\n
mkdir ~\/downloads && cd ~\/downloads<\/code><\/pre>\n\n\n\n
wget https:\/\/github.com\/VictoriaMetrics\/VictoriaMetrics\/releases\/download\/v1.91.3\/victoria-metrics-linux-amd64-v1.91.3.tar.gz<\/code><\/pre>\n\n\n\n
tar xzvf victoria-metrics-linux-amd64-v1.91.3.tar.gz<\/code><\/pre>\n\n\n\n
sudo mv victoria-metrics-prod \/usr\/local\/bin\/victoriametrics<\/code><\/pre>\n\n\n\n
sudo mkdir \/run\/victoriametrics<\/code><\/pre>\n\n\n\n
sudo nano \/etc\/systemd\/system\/victoriametrics.service<\/code><\/pre>\n\n\n\n
[Unit]\r\nDescription=VictoriaMetrics\r\nAfter=network.target\r\n\r\n[Service]\r\nType=simple\r\nStartLimitBurst=5\r\nStartLimitInterval=0\r\nRestart=on-failure\r\nRestartSec=1\r\nPIDFile=\/run\/victoriametrics\/victoriametrics.pid\r\nExecStart=\/usr\/local\/bin\/victoriametrics -storageDataPath \/data -retentionPeriod 360\r\nExecStop=\/bin\/kill -s SIGTERM $MAINPID\r\n\r\n[Install]\r\nWantedBy=multi-user.target<\/code><\/pre>\n\n\n\n
sudo mkdir \/etc\/systemd\/system\/victoriametrics.service.d<\/code><\/pre>\n\n\n\n
sudo nano \/etc\/systemd\/system\/victoriametrics.service.d\/ulimit.conf<\/code><\/pre>\n\n\n\n
[Service]\r\nLimitNOFILE=32000\r\nLimitNPROC=32000<\/code><\/pre>\n\n\n\n
sudo systemctl enable victoriametrics<\/code><\/pre>\n\n\n\n
sudo systemctl start victoriametrics<\/code><\/pre>\n\n\n\n
sudo systemctl status victoriametrics.service<\/code><\/pre>\n\n\n\n
$ sudo systemctl status victoriametrics.service \n\u25cf victoriametrics.service - VictoriaMetrics\n Loaded: loaded (\/etc\/systemd\/system\/victoriametrics.service; enabled; vendor preset: enabled)\n Drop-In: \/etc\/systemd\/system\/victoriametrics.service.d\n \u2514\u2500ulimit.conf\n Active: active (running) since Thu 2023-08-03 10:01:24 UTC; 11s ago\n Main PID: 116141 (victoriametrics)\n Tasks: 8 (limit: 4575)\n Memory: 6.4M\n CPU: 31ms\n CGroup: \/system.slice\/victoriametrics.service\n \u2514\u2500116141 \/usr\/local\/bin\/victoriametrics -storageDataPath \/data -retentionPeriod 360\n\nAug 03 10:01:24 abb victoriametrics[116141]: 2023-08-03T10:01:24.584Z info VictoriaMetrics\/lib\/memory\/memory.go:42 limiting caches to 2468732928 bytes, leaving 1645821952 bytes to the OS according to -memory.allowedPercent=60\nAug 03 10:01:24 abb victoriametrics[116141]: 2023-08-03T10:01:24.588Z info VictoriaMetrics\/lib\/storage\/storage.go:858 nothing to load from \"\/data\/cache\/curr_hour_metric_ids\"\nAug 03 10:01:24 abb victoriametrics[116141]: 2023-08-03T10:01:24.588Z info VictoriaMetrics\/lib\/storage\/storage.go:858 nothing to load from \"\/data\/cache\/prev_hour_metric_ids\"\nAug 03 10:01:24 abb victoriametrics[116141]: 2023-08-03T10:01:24.588Z info VictoriaMetrics\/lib\/storage\/storage.go:818 nothing to load from \"\/data\/cache\/next_day_metric_ids\"\nAug 03 10:01:24 abb victoriametrics[116141]: 2023-08-03T10:01:24.609Z info VictoriaMetrics\/app\/vmstorage\/main.go:122 successfully opened storage \"\/data\" in 0.028 seconds; partsCount: 0; blocksCount: 0; rowsCount: 0; sizeBytes: 0\nAug 03 10:01:24 abb victoriametrics[116141]: 2023-08-03T10:01:24.610Z info VictoriaMetrics\/app\/vmselect\/promql\/rollup_result_cache.go:114 loading rollupResult cache from \"\/data\/cache\/rollupResult\"...\nAug 03 10:01:24 abb victoriametrics[116141]: 2023-08-03T10:01:24.611Z info VictoriaMetrics\/app\/vmselect\/promql\/rollup_result_cache.go:142 loaded rollupResult cache from \"\/data\/cache\/rollupResult\" in 0.001 seconds; entriesCount: 0, sizeBytes: 0\nAug 03 10:01:24 abb victoriametrics[116141]: 2023-08-03T10:01:24.611Z info VictoriaMetrics\/app\/victoria-metrics\/main.go:80 started VictoriaMetrics in 0.030 seconds\nAug 03 10:01:24 abb victoriametrics[116141]: 2023-08-03T10:01:24.612Z info VictoriaMetrics\/lib\/httpserver\/httpserver.go:96 starting http server at http:\/\/127.0.0.1:8428\/\nAug 03 10:01:24 abb victoriametrics[116141]: 2023-08-03T10:01:24.612Z info VictoriaMetrics\/lib\/httpserver\/httpserver.go:97 pprof handlers are exposed at http:\/\/127.0.0.1:8428\/debug\/pprof\/<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"