Splunk Dev

How to plot in Splunk using R Project

harshal_chakran
Builder

Can any one help me to get the plot from R on Splunk

Below is the code, when i run on R along with the output on R

X<-C(1,2,3,4,5,6)
plot (x)

alt text

Now how do i use R Project on splunk to execute this sample code from splunk and get the plots on splunk.

Any help on this will be highly appreciated.

rfujara_splunk
Splunk Employee
Splunk Employee

Using the R plot function to create charts is not supported.

You can use the Splunk chart command to create charts which can be displayed in Splunk. That requires to pipe all the required data from the r command to the chart command:

... | r "..." | chart ...

You need to assign a R data frame to a output variable. Look here how to crate a data frame. All data which is assigned to the output variable is piped to the next command. In the above example, that is the chart command.

Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...