{"id":14066910,"url":"https://github.com/andrie/rrd","last_synced_at":"2026-04-02T18:38:05.018Z","repository":{"id":35001577,"uuid":"136734244","full_name":"andrie/rrd","owner":"andrie","description":"R package for working with .rrd files","archived":false,"fork":false,"pushed_at":"2022-08-18T17:07:19.000Z","size":13554,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T08:21:37.758Z","etag":null,"topics":["r","r-package","rrd","rrdtool","rstats"],"latest_commit_sha":null,"homepage":"https://andrie.github.io/rrd/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrie.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-09T15:16:19.000Z","updated_at":"2022-02-28T15:19:16.000Z","dependencies_parsed_at":"2022-08-08T03:16:09.722Z","dependency_job_id":null,"html_url":"https://github.com/andrie/rrd","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/andrie/rrd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrie%2Frrd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrie%2Frrd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrie%2Frrd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrie%2Frrd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrie","download_url":"https://codeload.github.com/andrie/rrd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrie%2Frrd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31313068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["r","r-package","rrd","rrdtool","rstats"],"created_at":"2024-08-13T07:05:19.636Z","updated_at":"2026-04-02T18:38:04.994Z","avatar_url":"https://github.com/andrie.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# rrd \u003cimg src=\"man/figures/logo.svg\" align=\"right\" height=\"139\" width=\"139\"/\u003e\n\n\u003c!-- badges: start --\u003e\n\n[![R build status](https://github.com/andrie/rrd/workflows/R-CMD-check/badge.svg)](https://github.com/andrie/rrd/actions) [![CRAN status](https://www.r-pkg.org/badges/version/rrd)](https://cran.r-project.org/package=rrd) [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html) [![](http://www.r-pkg.org/badges/version/rrd)](https://www.r-pkg.org:443/pkg/rrd) [![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/rrd)](https://www.r-pkg.org:443/pkg/rrd) [![Codecov test coverage](https://codecov.io/gh/andrie/rrd/branch/main/graph/badge.svg)](https://app.codecov.io/gh/andrie/rrd?branch=main)\n\n\u003c!-- badges: end --\u003e\n\nThe `rrd` package allows you to read data from an [RRD](https://oss.oetiker.ch/rrdtool/) Round Robin Database.\n\n## Installation\n\n### System requirements\n\nIn order to build the package from source you need [librrd](https://oss.oetiker.ch/rrdtool/doc/librrd.en.html). Installing [RRDtool](https://oss.oetiker.ch/rrdtool/) from your package manager will usually also install the library.\n\n| Platform        | Installation                 |\n|-----------------|------------------------------|\n| Debian / Ubuntu | `apt-get install librrd-dev` |\n| RHEL / CentOS   | `yum install rrdtool-devel`  |\n| Fedora          | `yum install rrdtool-devel`  |\n| Solaris / CSW   | Install `rrdtool`            |\n| OSX             | `brew install rrdtool`       |\n| Windows         | Not available                |\n\nNote: on OSX you may have to update `xcode`, using `xcode-select --install`.\n\n### Package installation\n\nYou can install the stable version of the package from CRAN:\n\n``` r\ninstall.packages(\"rrd\")\n```\n\nAnd the development version from [GitHub](https://github.com/):\n\n``` r\n# install.packages(\"remotes\")\nremotes::install_github(\"andrie/rrd\")\n```\n\n## About RRD and RRDtool \u003cimg src=\"man/figures/rrdtool-logo.png\" align=\"right\" height=\"70\"/\u003e\n\nThe `rrd` package is a wrapper around `RRDtool`. Internally it uses [librrd](https://oss.oetiker.ch/rrdtool/doc/librrd.en.html) to import the binary data directly into R without exporting it to an intermediate format first.\n\nFor an introduction to RRD database, see \u003chttps://oss.oetiker.ch/rrdtool/tut/rrd-beginners.en.html\u003e\n\n## Example\n\nThe package contains some example RRD files that originated in an instance of RStudio Connect. In this example, you analyze CPU data in the file `cpu-0.rrd`.\n\nLoad the package and assign the location of the `cpu-0.rrd` file to a variable:\n\n```{r load}\nlibrary(rrd)\nrrd_cpu_0 \u003c- system.file(\"extdata/cpu-0.rrd\", package = \"rrd\")\n```\n\nTo describe the contents of an RRD file, use `describe_rrd()`:\n\n```{r describe}\ndescribe_rrd(rrd_cpu_0)\n```\n\nTo read an entire RRD file, i.e. all of the RRA archives, use `read_rrd()`. This returns a list of `tibble` objects:\n\n```{r rrd}\ncpu \u003c- read_rrd(rrd_cpu_0)\n\nstr(cpu, max.level = 1)\n```\n\nSince the resulting object is a list of `tibble`s, you can easily work with individual data frames:\n\n```{r inspect-rrd}\nnames(cpu)\n\ncpu[[1]]\n\ntail(cpu$AVERAGE60$sys)\n```\n\nTo read a single RRA archive from an RRD file, use `read_rra()`. To use this function, you must specify several arguments that define the specific data to retrieve. This includes the consolidation function (e.g. \"AVERAGE\") and time step (e.g. 60), the `end` time. You must also specifiy either the `start` time, or the number of steps, `n_steps`.\n\nIn this example, you extract the average for 1 minute periods (`step = 60`), for one entire day (`n_steps = 24 * 60`):\n\n```{r rra}\nend_time \u003c- as.POSIXct(\"2018-05-02\") # timestamp with data in example\navg_60 \u003c- read_rra(rrd_cpu_0, cf = \"AVERAGE\", step = 60, n_steps = 24 * 60,\n                     end = end_time)\n\navg_60\n```\n\nAnd you can easily plot using your favourite packages:\n\n```{r plot, out.width=\"90%\", fig.height=3, fig.width=8}\nlibrary(ggplot2)\nggplot(avg_60, aes(x = timestamp, y = user)) + \n  geom_line() +\n  stat_smooth(method = \"loess\", span = 0.125, se = FALSE) +\n  ggtitle(\"CPU0 usage, data read from RRD file\")\n```\n\n## More information\n\nFor more information on `rrdtool` and the `rrd` format please refer to the official [rrdtool documentation](https://oss.oetiker.ch/rrdtool/doc/index.en.html) and [tutorials](https://oss.oetiker.ch/rrdtool/tut/index.en.html).\n\nYou can also read a more in-depth description of the package in an [R Views](https://rviews.rstudio.com/) blog post [Reading and analyzing log files in the RRD database format](https://rviews.rstudio.com/2018/06/20/reading-rrd-files/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrie%2Frrd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrie%2Frrd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrie%2Frrd/lists"}