VictoriaMetrics Quiz
Test your understanding of VictoriaMetrics.
- Which is NOT a major advantage of VictoriaMetrics compared to Prometheus?
- A) Up to 7x more efficient data compression
- B) Up to 20x faster performance on complex queries
- C) Requires learning a separate query language
- D) Horizontal scaling capability
Show Answer
Answer: C) Requires learning a separate query language
Explanation: VictoriaMetrics uses MetricsQL query language, which is a superset of PromQL. All existing PromQL queries work, and it only provides additional convenience features. Therefore, there's no need to learn a separate query language.
- Which is NOT a component of VictoriaMetrics cluster mode?
- A) vminsert
- B) vmstorage
- C) vmselect
- D) vmoperator
Show Answer
Answer: D) vmoperator
Explanation: VictoriaMetrics cluster mode consists of three core components: vminsert (write request routing), vmstorage (data storage), vmselect (query processing). vmoperator is a separate Kubernetes Operator, not a core component of cluster mode.
- What is the main role of vmagent?
- A) Long-term data storage
- B) Dashboard rendering
- C) Metric collection and Remote Write transmission
- D) Alert routing
Show Answer
Answer: C) Metric collection and Remote Write transmission
Explanation: vmagent is a lightweight agent that collects metrics and sends them to VictoriaMetrics or other remote storage. It's compatible with Prometheus scrape configuration and provides features like data buffering, retransmission, and label relabeling.
- What is the purpose of the
keep_last_value()function in MetricsQL?- A) Keep maximum value
- B) Keep last value (gap filling)
- C) Keep first value
- D) Keep average value
Show Answer
Answer: B) Keep last value (gap filling)
Explanation:keep_last_value() is a MetricsQL extension function that fills missing values (gaps) in time series data with the last known value. It's useful for preventing gaps in dashboards and alerts when there are scrape failures or temporary data loss.
- What is the role of the
--dedup.minScrapeIntervalflag in VictoriaMetrics?- A) Set minimum scrape interval
- B) Remove duplicate samples within specified interval
- C) Set data compression interval
- D) Set alert evaluation interval
Show Answer
Answer: B) Remove duplicate samples within specified interval
Explanation:--dedup.minScrapeInterval removes duplicate samples of the same time series within the specified time interval. For example, --dedup.minScrapeInterval=30s merges duplicate data points within 30 seconds into one. It's useful in HA configurations where multiple Prometheus instances scrape the same targets.
- What is the correct criterion for choosing between vmsingle and vmcluster?
- A) Always use vmcluster
- B) vmsingle is recommended for under 100M samples/day without high availability requirements
- C) vmsingle doesn't support query functionality
- D) vmcluster only works on a single node
Show Answer
Answer: B) vmsingle is recommended for under 100M samples/day without high availability requirements
Explanation: vmsingle (single-node mode) is simple to configure and suitable for small to medium environments. vmsingle is recommended when daily samples are under 100M and high availability is not essential. Use vmcluster for large-scale environments or when high availability is required.
- What does the
replicationFactor=2setting mean in VictoriaMetrics cluster?- A) Use only 2 storage nodes
- B) Replicate each data point to 2 storage nodes
- C) Execute queries on only 2 nodes
- D) Apply 2x compression
Show Answer
Answer: B) Replicate each data point to 2 storage nodes
Explanation:replicationFactor=2 configures vminsert to replicate each data point to 2 vmstorage nodes. This allows service to continue without data loss even if one storage node fails. This is a recommended setting for high availability.
- What is the purpose of the
defaultoperator in MetricsQL?- A) Set default labels
- B) Return default value when there's no result
- C) Set default aggregation function
- D) Set default time range
Show Answer
Answer: B) Return default value when there's no result
Explanation: The default operator in MetricsQL returns a default value when the query result is empty or NaN. For example, rate(http_requests_total[5m]) / rate(http_requests_total[5m]) default 0 returns 0 instead of a division by zero error. In PromQL, complex conditionals are needed for this handling.
- What is the correct role of vmalert?
- A) Metric collection
- B) Data storage
- C) Alert rule evaluation and alert generation
- D) Dashboard creation
Show Answer
Answer: C) Alert rule evaluation and alert generation
Explanation: vmalert evaluates alerting rules and sends alerts to Alertmanager when conditions are met, similar to Prometheus's alerting functionality. It can use VictoriaMetrics or Prometheus as data sources and also supports recording rules.
- What is the main purpose of vmbackup in VictoriaMetrics?
- A) Real-time data replication
- B) Create backups to object storage
- C) Log backup
- D) Configuration file backup
Show Answer
Answer: B) Create backups to object storage
Explanation: vmbackup is a tool that backs up VictoriaMetrics data to object storage like S3, GCS, Azure Blob. It creates consistent backups using snapshot functionality and can be restored using vmrestore. It's an essential tool for disaster recovery and data protection.