How to convert json file from nagios to rrd for plotting with rrdgraph? - nagios

I am using nagios API(rrdexport) to get data for device , but i need to plot the data in rrdgraph,
since rrdgraph only takes .rrd file as input , how to i convert json file back to .rrd file ,
or is there a way to plot rrdgraph with json file as input.

You have a couple of options.
You could always generate your graph from the same RRD file that you used to originally export the XML. Since you can export the data you can also graph it.
You could use rrdrestore to load the exported data back into a (temporary) RRD file, then call rrdgraph on that to make the graph.
RRDTool supports libdbi as a data source, in the same way as RRD files. If you have an appropriate libdbi format driver for your data then you can pull it from there. For example, load your data into a mysql database, and let rrdtool graph from that.
For more information about using libdbi as a data source, see https://oss.oetiker.ch/rrdtool/doc/rrdgraph_libdbi.en.html

Related

is it possible store PDF or HTML content in snowflake.Please help us what is the best data type to store PDF or HTML data. How to retrieve that

is it possible store PDF or HTML content in snowflake.Please help us what is the best data type to store PDF or HTML data. How to retrieve that
If you just want to store HTML or PDF for any technical reason, you can use binary date type which can store such files up to 8Mb size. However, you could not query binary date type directly in your query.
If you have to extract any information, you can use python CLI and use python libraries to extract additional information, but you can not use SQL to extract any information.
HTML can be saved as XML but you can try that as it has couple of limitation and not sure if XML parsing is available in GA or still preview.
Snowflake has new unstructured data storage and querying functionality now. You can store the PDF in a stage and use a directory table to view the file list within the stage. You can create scoped URL's, etc. to allow applications to render the PDF files, etc.

Consume data from local JSON file into website?

I work for a small publishing company with an internal website that displays a static HTML table of our published products.
We have a need to be able to list and sort published products (about 1-2 items are published per day) dynamically that is being fed from an Excel spreadsheet. The Excel spreadsheet is what we are currently using to maintain the data. The Excel spreadsheet is on a shared network drive available to the company.
I am familiar with AngularJS, ReactJS, and VueJS2 for front-end development and was wondering if I would be able to use one of those tools to consume a Excel file, parse it to JSON, and then display it dynamically on the client side.
Is something like this is possible?
When a user finishes editing the Excel sheet and saves it to the shared network drive, is there a script that would automatically save the data as JSON? I assume we would then simply have our Javascript framework reference and consume the saved JSON to populate its published products list.
Note: We are unable to use a relational database at this time (ie MySQL).
Part 1 - generating json from excel...
front-end technologies are not the way to go. You need to run a service that watches folder for change (like nodejs or python). Saving as csv instead of xls might make things easier as you may not need extra libraries to make sense of your xls file
Part 2, displaying json data...
Your browser, by default, cannot load a local json file. So you may need to run a server (again nodejs and python make this relatively easy) to host your json file.
there are many ways of presenting data these days, but without knowing some of your particular and based on the information you did share, looks like you've got a steep learning curve to get something like this going.

Manually create a multi-sheet file for excel from C

I am working on a C application. I was planning on using a CSV file to read the values into a spread sheet, but then as the data got more and more complex (around 100 cols), I saw the need to start to do multiple sheets. I am working on a single board computer, and the file is used for storing diagnostic information. I would like to be able to write the file from the SBC in an ASCII format, and then import it to excel (or the open source alternative), and have multiple sheets. Is this even possible, or should I start working on macros to run on the data?
Maybe consider using XML to write the data, then it can easily be transformed into whatever format you want, and you can have the data be emitted in a way that make semantic sense rather than according to the architecture of a spreadsheet. This might allow more flexibility for different external programs to interact with the data. You can use XSLT to transform it into multiple CSV files if that's desired and there is probably reasonable ways to import it into spreadsheets directly.

How to interpret the database file of Football Manager

Is there any way to view the default database file shipped with FM release, e.g., like the file "basic_people_db.dat" in "<fmdir>\Football Manager 2012\data\db\1200".
I mean, either by converting it to a human-readable format like spreadsheet or load it to some database directly...
I highly doubt it.
If the DAT file is actually a generic "data" file, the program that
generated the DAT file is your best bet for opening it

Obtaining Raw Data from NagiosXI and/or OPSview

I am currently working on completing my Masters Thesis project. In order to do so I need to be able to obtain the raw data accumulated in NagiosXI and/or OPSview. Because both of these are based off of the Nagios core, I assume the method to obtaining the raw data may be similar. This raw data is needed so that I can at a later time perform specific statical calculations which relate to my Masters Thesis. I have looked online and so far found some Nagios plugins which obtain raw data and then manipulate it for graphs and visuals, but I need the raw numbers in order to complete my calculations.
I am also researching to see if I can create maybe a PHP script, or some other language, that will extract the data from Nagios and save it in a word or excel document. However, this would be a bit of extra work as I am unfamiliar with either PHP or MySQL queries. Because of this I hope to be able to find a plugin, or something similar, that can get the data for me.
Cyanide,
I can't speak for NagiosXI, but I can for Opsview :)
You could access the data that is stored in the RRD files. You can use rrdtool dump to pull the values out or use a URL like: /rrdfetch?start=1307608993&end=1307695393&hsm=opsview%3A%3ACheck%20Loadavg%3A%3Aload1&hsm=opsview%3A%3ACheck%20Loadavg%3A%3Aload5
And this returns back the JSON data points. This is undocumented, but is used to power the interactive javascript graphing.
Alternatively, if you have ODW enabled with full statistics, then the raw data is stored in the ODW database and you can then extract the raw data with SQL commands. See http://docs.opsview.com/doku.php?id=opsview-community:odw for more information.
Ton
You can try use mk livestatus http://mathias-kettner.de/checkmk_livestatus.html
or http://exchange.nagios.org/directory/Addons/APIs/JSON/Nagios2JSON/details
All this tools get you status data without need to go to DB or status file. While XI is based on Nagios it can still work with him.
Please take a look at http://dmytro.github.com/nagira
It's a web services API to access Nagios data. You can get all hosts, service status data, objects configuration in multiple formats JSON, XML or YAML.

Resources