Click here to Skip to main content
Email Password   helpLost your password?
rrdtool-logo-light.png

Introduction

NHawk is an initiative to provide a thin, complete RRDtool provider for the .Net and Mono framework. The project goal is targeted at providing a C# interface to native RRDtool facilities through appropriate .Net / Mono object model semantics with the intent of retaining an intuitive syntax that fits naturally into the .Net / Mono paradigm and closely resembles that of native RRDtool. In doing so, NHawk seeks to provide a powerful time series analysis toolkit library that fills a big void in the .Net and Mono framework. It is our hope to provide a toolkit that promotes high productively, robustness, and expressiveness; enabling proficient C# developers to build code interchangeably (and intuitively) with native RRDtool script. It is a NHawk goal to promote productive use by allowing clients to refer solely to native RRDtool documentation resources, and thereby carry a very short learning curve (in most cases if the developer is familiar with both RRDtool and C#). The example code snippets that follow will hopefully illustrate the basic concepts. Please make particular note of syntactic similarities, and pay special attention to the section highlighting serialization, deserialization, and deepcloning, as these comprise powerful architectural utility which include support for web service oriented applications as well as for generation of, and interoperation with existing (native) RRDtool scripts.

Background

The examples that follow are taken from an expanded tutorial which has been included along with the version 1.0 release of the source code and binaries.

Please note: that the example material that follows is derived from a tutorial created initially by: Alex van den Bogaerdt <alex@ergens.op.het.net> which can be viewed at: http://oss.oetiker.ch/rrdtool/tut/rrdtutorial.en.html

RRDtool is written by Tobias Oetiker <tobi@oetiker.ch> http://oss.oetiker.ch/rrdtool/index.en.html

*** See the end of this document for contact info. and information

pertaining to development and status of the current code revision ***

Using the code

RRDtool Syntax for defining and creating RRDs

rrdtool create test.rrd --start 920804400
DS:speed:COUNTER:600:U:U 
RRA:AVERAGE:0.5:1:24
RRA:AVERAGE:0.5:6:10 

NHawk (C#) Syntax for defining and creating RRDs

RRD rrd1 = new RRD("test.rrd", 920804400);
rrd1.addDS(new DS("speed",  DS.TYPE.COUNTER, 600, DS.U, DS.U));
rrd1.addRRA(new RRA(RRA.CF.AVERAGE, 0.5, 1, 24));
rrd1.addRRA(new RRA(RRA.CF.AVERAGE, 0.5, 6, 10));
rrd1.create(true);

RRDtool Update Syntax

rrdtool update test.rrd 920804700:12345

NHawk (C#) Update Syntax

NHawk provides a means to update an RRD by packing expected DS (data source) arguments into an array of type object or string. One of the following C# method overloads should be used.

Note: the version with type object is explictly casted (internally) to string as the update command is serialized and sent to rrdtool for processing. The intent is to save you from having to explictly cast (whenever possible). When not possible you’ll have use the string version. Aside from that, both methods are equivalent.

rrd1.update(920804700, new object[] { 12345 });
rrd1.update(920804700, new string[] { “12345” });
string[] args = new string[1];
args[0] = “12345”;
rrd1.update(920804700, args);

The (current) serialized update string can be retrieved by calling: “rrd1.CurrentUpdateStr” as in the example below:

Console.WriteLine("{0}", rrd1.CurrentUpdateStr);

Resulting in the following console output…

rrdtool update test.rrd 920804700:12345

Note: “CurrentUpdateStr” should be called after each call to:

“rrd1.update(…)”, because serialization is done there.

RRDtool Graph Syntax

 rrdtool graph speed4.png                           
--start 920804400 --end 920808000               
--vertical-label km/h                           
DEF:myspeed=test.rrd:speed:AVERAGE              
"CDEF:kmh=myspeed,3600,*"                       
CDEF:fast=kmh,100,GT,100,0,IF                   
CDEF:over=kmh,100,GT,kmh,100,-,0,IF             
CDEF:good=kmh,100,GT,0,kmh,IF                   
HRULE:100#0000FF:"Maximum allowed"              
AREA:good#00FF00:"Good speed"                   
AREA:fast#550000:"Too fast"                     
STACK:over#FF0000:"Over speed"

NHawk(C#) Syntax Graph Syntax

GRAPH gr4 = new GRAPH("speed4.png", "920804400", "920808000");
gr4.yaxislabel = "km/h";
gr4.addDEF(new DEF("myspeed", rrd1, "speed", RRA.CF.AVERAGE));
gr4.addCDEF(new CDEF("kmh", "myspeed,3600,*"));
gr4.addCDEF(new CDEF("fast", "kmh,100,GT,kmh,0,IF"));
gr4.addCDEF(new CDEF("over", "kmh,100,GT,kmh,100,-,0,IF"));
gr4.addCDEF(new CDEF("good", "kmh,100,GT,0,kmh,IF"));
gr4.addGELEM(new HRULE("100", Color.Blue, "Maximum allowed"));
gr4.addGELEM(new AREA("good", Color.Green, "Good speed"));
gr4.addGELEM(new AREA("fast", Color.Brown, "Too fast"));
gr4.addGELEM(new AREA("over", Color.Red, "Over speed",true));
gr4.graph();

speed4.png

Note: the NHAWK code line:
gr4.addGELEM(new AREA("over", Color.Red, "Over speed",true));
is semantically equivalent to:
STACK:over#FF0000:"Over speed"

NHAWK is using the newer syntactic constructs, as the STACK
construct as a direct graphing element is deprecated as of RRDTool 1.3

Architectural Features: Serialization and Deserialization and Deepcloning

All NHAWK constructs are built as composite structures, in which a contract states that each construct must be able to serialize, deserialize, and deepclone itself (see the UML architecture diagram available with the source download). In other words, a higher level construct (such as the GRAPH class) would serialize itself by asking all of its composed constructs to serialize themselves. This is a powerful feature in that it opens up a whole new level of functionality. This includes the generation and interoperation with (native) RRDTool script, as well as ease of use with service orientated architectures such as web service applications. Below we illustrate with an example for the GRAPH class.

GRAPH gr5 = new GRAPH(gr4.ToString(), ".\\"); 
Console.WriteLine("{0}", gr5.ToString());

The above code snippet performs the following operations
1) graph object g4 is serialized and passed to the GRAPH class
deserialization (promotion) constructor.

2) graph object g5 is instantiated by deserialing the serialized
(string) form of object g4.

3) object g5 is serialized and written to the console as shown
below…

graph speed4.png --start 920804400 --end 920808000
--vertical-label "km/h"
DEF:myspeed=test.rrd:speed:AVERAGE
CDEF:kmh=myspeed,3600,*
CDEF:fast=kmh,100,GT,kmh,0,IF
CDEF:over=kmh,100,GT,kmh,100,-,0,IF
CDEF:good=kmh,100,GT,0,kmh,IF
HRULE:100#0000FF:"Maximum allowed"
AREA:good#008000:"Good speed"
AREA:fast#A52A2A:"Too fast"
AREA:over#FF0000:"Over speed"

DeepCloning and why NHawk has it

GRAPH gr6 = GRAPH.DeepClone(gr5);
Console.WriteLine("\n{0}", gr6.ToString());

Above object gr6 is a (new memory) copy of gr5. Essentially, NHawk is really just a whole load of parsing, and therefore every aggregated class member is either a string or a value type. Value types are deep copied by default, and although string is a reference type, NHawk uses temporary StringBuilders to return newly constructed (new memory) string objects. This could prove useful in many circumstances as it provides for limited preservation of object identity in a object model (shallow reference) which works on premise of not having object identity. Finally, just for completeness the below code snippet illustrates the usual shallow copy.

GRAPH gr7 = gr6;

Current code base progress: revision: 1.0

DEF (Graph Definitions) == 100%
CDEF (Graph Calc Definitions) == 100%

RRD (Defining, creating, and loading existing Round Robin Database files).
DS (data source) == 100%
RRA (round robin archives) == 100%

GRAPHING ELEMENTS
LINE == 100%
AREA == 100%
VRULE == 100%
HRULE == 100%
SHIFT == 100%

GRAPH == 90% (approx. needs VDEF, PRINT Elements)

Current TODO List (for features I plan to implement next).
Timeline: 2-4 weeks. Note: once the list below is completed, tested and added what’s already be done, then the vast majority of the major rrdtool features will be complete. This is a very do-able project.
-- VDEF
-- PRINT Elements
-- RRDFetch

Compilation instructions and library usage

-- See the user manual included with the source download.

Getting Started

For a quick start, see the tutorial (included with the source) located in: "NHawk\tutorials\rrdtutorial.en.html"
The source code can be compiled and executed from folder: "NHawk\tutorials\rrdtutorial1_code"

RRDtool can be downloaded from : http://oss.oetiker.ch/rrdtool/pub/
A good site for Windows and Netware Binaries: http://www.gknw.net/mirror/rrdtool/
(latest == rrdtool-1.2.28-bin-w32.zip)


Author Contact Info.

Michael Corley
mwcorley79@gmail.com

History

22 August 08 -- Posted revision 1.0

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
AnswerSmall bugfix - step parameter in RRD constructor
red2paul
0:52 24 Nov '09  
Hi

Thanks for making this code available - has saved me a mountain of time   Smile

Just noticed that the step param to the RRD constructor wasn't working -

was :

            public RRD(string filename, long start, long step): this(filename, start)
            {
                  step = this.step;
            }

which meant step always got set to default (of 300)

should be :

            public RRD(string filename, long start, long step): this(filename, start)
            {
                  this.step = step;
            }

Regards

Paul
GeneralRe: Small bugfix - step parameter in RRD constructor
Mike Corley
10:59 24 Nov '09  
Paul -

Thank you... and great catch! Soon I will have to post an updated revision of the code base... I will include the fix and credit you.

Thanks again for spotting it

Mike
GeneralExisting port of rrdtool to c#: rrdsharp (on SourceForge)
I'm Chris
1:21 18 Nov '09  
Hello,

Just to mention that rrdtool has been ported a while ago to a full managed c# version: rrdsharp, available at http://sourceforge.net/projects/rrdsharp/[^]

Note that rrdsharp is a complete rewrite: it offers 99% of the functionnality, is equally performant, works on .NET and Mono, but its binary format (the "rrd" file) are not binary compatible. Also, its licence is LGPL.

>> Mike, you could maybe update your article to mention it?

Regards.

Chris
www.aulofee.com - Infrastructure and Security Supervision, Event Correlation

GeneralRe: Existing port of rrdtool to c#: rrdsharp (on SourceForge)
Mike Corley
11:32 24 Nov '09  
Hi Chris -

I wasn't very aware that rrdsharp had existed, however I do recall the name. I will have to take a close at it. I'm still glad I did the NHAWK rev. Although NHAWK isn't as complete as other providers yet... I believe the architectural basis for the design was unique in that, my goal is to provide the conduit for easy translation (back and forth) between the .net object model (in C# syntax) and the native rrdtool scripting model. In essence, that implies simplifying parsing/code generation level components. An example application might entail development of a browser plugin that would host an XML based interface with code behind. So the user might express rrdtool graphs in such a form that allow NHAWK's parsing and code generation to build repesentative objects on the managed heap without requiring the user to necessarily deal with code directly, but rather through the code behind model. What I'm getting at is a concept that is similar (perhaps even compatable) with the Silverlight 2/3 model. I haven't given much thought to such a concept, but the point is that the architural basis would have to be preconceived with those notions in mind, and that is part what I hope to have captured in the NHAWK design. Most folks would never see that as it is advertised mainly as yet another provider, but that's a little insight into my orginal intentions. thanks for providing that reference... I will take a good look at rrdsharp it sounds pretty robust and complete... It seems that foilks (in general) are not aware of it?
GeneralRe: Existing port of rrdtool to c#: rrdsharp (on SourceForge)
I'm Chris
22:59 24 Nov '09  
Right, we have not spent a lot of time advertising rrdsharp. What interested us is to have something operational and efficient... which is what it is now! We were even in advance at a time compared to rrdtool as there has been a cache implemented in rrdsharp for a long time which really boosts its performance (it avoids to continuously open/read/write/close the rrd files). Now that rrdtool can work in a distributed manner, we could try to implement the idea in rrdsharp.

If you feel the spirit/will of contributing to rrdsharp, either for its development or by creating a nice website/webpage with screenshots, etc., you (and everybody) are welcome!

Chris
www.aulofee.com - Infrastructure and Security Supervision, Event Correlation

GeneralIssues using NHawk under Ubuntu and OpenSuse
ccdr
5:44 10 Sep '09  
Hi,

I'm getting some troubles with NHawk under Ubuntu and openSuse.

The Mono JIT compiler is version 2.0.1, the kernel for both distros is 2.6.

The PNG image is created, but it's blank, no line is drawn at all.

This issue does not occur under Windows where the graph is generated correctly.

I tried with 2 different versions of rrdtool, 1.3.1 and 1.2.20, with the same result, the PNG is generated, the scale is right, but the line is not drawn.

Any hints about this issue?

The code I use is the following:

namespace Falco1
{
class Genera
{
public static void Main(string[] aa)
{

CreateUpdateFile("test.rrd");
CreateGraph("test.rrd");
Console.WriteLine ("Done!!!!");

}

private static void CreateGraph(string filename)
{
GRAPH gr1 = new GRAPH("speed.png", "920804400", "920808000");

gr1.addDEF(new DEF("myspeed", filename, "speed", RRA.CF.AVERAGE));

gr1.addGELEM(new LINE(2, "myspeed", Color.Red));

gr1.graph();
}


private static void CreateUpdateFile(string filename)
{
File.Delete("test.rrd");

RRD rrd1 = new RRD(filename, 920804400);
rrd1.addDS(new DS("speed", DS.TYPE.COUNTER, 600, DS.U, DS.U));
rrd1.addRRA(new RRA(RRA.CF.AVERAGE, 0.5, 1, 24));
rrd1.addRRA(new RRA(RRA.CF.AVERAGE, 0.5, 6, 10));
rrd1.create(true);

rrd1.update(920804701, new string[] { "12345" });
rrd1.update(920805001, new string[] { "12357" });
rrd1.update(920805301, new string[] { "12363" });
rrd1.update(920805601, new string[] { "12363" });
rrd1.update(920805901, new string[] { "12363" });
rrd1.update(920806201, new string[] { "12373" });
rrd1.update(920806501, new string[] { "12383" });
rrd1.update(920806801, new string[] { "12393" });
rrd1.update(920807101, new string[] { "12399" });
rrd1.update(920807401, new string[] { "12405" });
rrd1.update(920807701, new string[] { "12411" });
rrd1.update(920808001, new string[] { "12415" });
rrd1.update(920808301, new string[] { "12420" });
rrd1.update(920808601, new string[] { "12422" });
rrd1.update(920808901, new string[] { "12423" });

}
}
}

Thanks and regards,

Corrado.
GeneralRe: Issues using NHawk under Ubuntu and OpenSuse
Mike Corley
6:34 10 Sep '09  
Hello Corrado -

I've had the same issue since the time of development, which has been documented. I have not cracked the code on why this happens. I believe this to be an issue which has to do with how processes are started in linux coupled with how Mono the Process class (with StartInfo) etc. internally starts external process. The reason being is that all NHAWK does is serialize (translate) .net object syntax into native rrdtool syntax and then invoke the rrdtool exe. Here is an example instance from GRAPH.cs:
public void graph()
{
NHawkCommand.Instance.RunCommand(ToString());
}

....and here is the RunCommand which executes the native rrdtool code in: HHawkCommand.cs

public void RunCommand(string arguments)
{
Process p;
//string stdout; // = "";
string stderr = "";
try
{
p = new Process();
p.StartInfo.FileName = RRDCommandPath;
p.StartInfo.Arguments = arguments;
p.StartInfo.EnvironmentVariables["path"] = RRDCommandPath;

p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.RedirectStandardOutput = true;

//p.StartInfo.WorkingDirectory = Directory.GetCurrentDirectory();
//if (!System.IO.File.Exists(p.StartInfo.FileName))
// throw new Exception("File: " + p.StartInfo.FileName + " not found");

if (p.Start())
{
//stdout = p.StandardOutput.ReadToEnd();
stderr = p.StandardError.ReadToEnd();
p.WaitForExit();
}
if (p != null)
{
p.Close();
p.Dispose();
}
}
catch (Exception ex)
{
throw new RRDCommandException("RRDtool Command: ", ex);
}
so nothing out of the ordinary by all this... like you said, works fine in Windows... seems to be artificat of eith rrdtool, linux and/or mono itself.
If you copy the actual rrdtool code(yielded by calling the ToString() method. e.g. from your code gr1.ToString() ) and then paste that into a text file save and run rrdtool externally everything is perfect! Bothers the heck out me! Unsure I have not had the time to investigate this further, but I will get back to it soon. Any suggestions or ideas that you or anyone may have are welcome, and greatly appreciated.

Mike C.
AnswerHiding the command prompts
CylindricalMark
1:10 8 Sep '09  
Hello,

First of all, great interface Smile Just what I was looking for.

I'm using VS2008 (if that makes any difference) and have noticed that the command-prompts are flashing up on screen as rrdtool does it's work.

Is there any problem with adding "p.StartInfo.CreateNoWindow = true;" to the two places where rrtool is called? I've tried this and it seems to work okay, but I'm not familiar enough with C# to know if it has knock-on effects.


public void RunCommand(string arguments)
{
Process p;
//string stdout; // = "";
string stderr = "";
try
{
p = new Process();
p.StartInfo.CreateNoWindow = true;


public Stream RunCommandRedirect(string command)
{
Process p;
string stdout = "";
string stderr = "";
try
{
p = new Process();

p.StartInfo.FileName = RRDCommandPath;
p.StartInfo.CreateNoWindow = true;

GeneralRe: Hiding the command prompts
Mike Corley
4:02 8 Sep '09  
Hello -

Actually that's a great thing to do. As you can likely tell, I spent most of my effort focusing on the interface itself... so yes please do that. I'll make a note and add p.StartInfo.CreateNoWindow = true; to my next release build as well, and I'll credit you for it. Thanks. I haven't had the time lately to do much with NHAWK (I will get back with an update release). My hope was to get a .Net provider started and have folks from industry add some of the things I left out in addition to offer bug fixes (then we'd all benifit from a more complete and supported provider).

Thanks, Smile

Mike
GeneralRe: Hiding the command prompts
CylindricalMark
5:22 8 Sep '09  
No problem. We can only work on these things as the paying work allows time Wink

I might be using NHAWK in a project I'm working on to get some trend information out of our CRM system, in which case I may have more fixes coming down the line. Might not though, depends on the go/no-go from management. They're not always too keen on new ways of doing things!
Generalcouple of newby questions
tbhanson
7:22 3 Jun '09  
hi, this looks like great stuff and i'm intrigued to try it out.

i managed to download the zip and build first the NHawk and then the rrdtutorial1 solutions with VS2008.

i wasn't quite sure what i was supposed to do with this:
//uncomment this (below) and set to correct path for rrdtool.exe for win32
//NHawkCommand.Instance.RRDCommandPath = @"e:\downloads\rrdtool\release\rrdtool.exe";

but assume it means i should download, e.g. rrdtool-1.2.30-bin-w32.zip from www.gknw.net/mirror/rrdtool/

and then point to my local copy.

however, this line in the tutorial
using NHAWK;

shows in red (should i add references?).

i can step a few lines into the code, but on this line:
rrd1.create(true);

i get an exception:
"ERROR: failed to parse data source 600:n.\r\n"

so i guess i'm doing something wrong or missing some step(s).

any pointers would be grately appreciated.

cheers,

Tim Hanson
GeneralRe: couple of newby questions
Mike Corley
8:28 3 Jun '09  
Hello tbhanson -

Thanks for reading!
1) You need to download the rrdtool.exe and place it in a directory of your choice: e.g. "c:\rrdtool\rrdtool.exe", then point NHAWK at the full path as in: NHawkCommand.Instance.RRDCommandPath = @"c:\rrdtool\rrdtool.exe";

2) You may need to add a reference the NHAWK library assembly. You can do that by adding a reference via the solution explorer (in VS 2008) and point at folder \binaries\VSWinNHawk.dll for VS compiled for windows or MonoWinNHawk.dll for Mono compiled for windows.

3) You get the parse exception because you need to set the thread culture to that of the United States. So... somewhere at the top of the programs (perhaps next to "NHawkCommand.Instance.RRDCommandPath"...) you need to paste the following line of code: Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");

Now all the tutorials should run as expected... good luck and thanks for reading,

Mike C.
GeneralRe: couple of newby questions
tbhanson
5:11 4 Jun '09  
Thanks, Mike!

OK, i've done 1; re 2 i note that i already have such a reference and it appears correct, but build still says it can't find NHawk. hmmm. if i re-add the same one nothing changes.

now i'm confused how it ran yesterday. at one point i added another reference...; i think i found an NHawk.dll somewhere and thought that looked right -- does that make sense?

cheers,

Tim

p.s. re 3: thx, i saw that in some of the other threads, should have realized it applied to me too. Smile
GeneralRe: couple of newby questions
Mike Corley
8:24 4 Jun '09  
Hi Tim -

I'm not sure why you are having the problems that you are... but this should be easy to get through. Let me make sure I have everything straight... Are you attempting to run the "rrdtutorial1" solution from the "rrdtitorial1_code" folder? Are you attempting run from with in the visual studio 2008 IDE or the command line (try with IDE first) Finally, is the reference you've added to: "\binaries\VSWinNHawk.dll"? If all these steps are not true..., then try in this order. if they are then for kicks try removing the namespace clause "using NHAWK;", then right click on any highlighted RRD identifier and click resolve. Does the the namespace get resolved... if not your problem might be some type of path issue?? In the directoy you've placed the NHAWK code, are there any spaces in the directory names (shouldn't be a problem but just wondering)? What version of windows are you running?

let me know...

Mike
GeneralRe: couple of newby questions
tbhanson
2:18 5 Jun '09  
thx, Mike,

yes, i'm running the rrdtutorial1 solution from the rrdtutorial1_code folder in the VS2k8 IDE. yes, this reference to VSWinNHawk.dll was already there.

if i comment out using NHawk and try resolve i get 2 choices
- using NHawk -- takes me back to "using NHawk"
- using NHawk.RRD solves only one instance and i would have to correct them all.

it's odd: seems clear it needs using NHawk, but there is a problem with it.

i wonder if Resharper (active on my machine) is part of the problem.

--Tim
GeneralRe: couple of newby questions
Mike Corley
8:17 5 Jun '09  
Hi Tim -


It sounds like you've done everything correctly... it doesn't seem like anything on your machine would conflict but that certaintly is possible... would it be possible to try running on a different machine? I'll continue to think and provide suggestions as they come to me.

Thanks,

Mike
GeneralRe: couple of newby questions
tbhanson
4:42 8 Jun '09  
hi, Mike, thanks.

i tried disabling Resharper and VMDebugger (the only add-ins on my VS2008), but this didn't help.

i don't have another machine with VS2008, but could try under VS2005 if that's possible. the solution wants VS2008 but might it work for me to roll my own solution?

cheers,

Tim
GeneralRe: couple of newby questions
tbhanson
4:53 8 Jun '09  
heh,

i get farther with this idea and perhaps i discovered the problem. i looked at VSWinNHawk.dll with the object browser and it appears to contain a class NHAWK -- all caps. so I changed my using line to all caps and the project compiled (maybe i can use this trick in VS2008 as well?

anyway, i get farther than before and the first exception comes at the line
gr1.graph();

ERROR: failed to load C:\Windows\fonts\DejaVuSansMono-Roman.ttf

presumably i can fix that easily enough.

i'll keep you posted.

cheers,

Tim
GeneralRe: couple of newby questions
tbhanson
5:32 8 Jun '09  
p.s. hope i'm not overstaying my welcome here by all the replies. Smile

i assume this font question is one that can either be fixed in code or config.

just now i remembered another warning that i get in many (perhaps all) subprojects of the NHawk solution:
- the project location is not trusted: ...NHawk\src\AREA
Running the application may result in security excpetions when it attempts to perform actions which require full trust

i haven't run into this before so i'd be curious why it happens and what the best approach to avoiding / overcoming it might be.

cheers, Tim
GeneralRe: couple of newby questions
Mike Corley
9:22 8 Jun '09  
Tim -

Yes! Good! You should be all set! The RRDTool.exe requires this font, which you normally get along with rrdtool. Just install it in the windows fonts directory.

Also.. you should be able to compile from the command line with the following.
Open a visual studio command prompt, and navigate to folder: "tutorials\rrdtutorial1_code"
type: "win32_vs_build_rrdtutorial.bat" and press enter (should compile). Then type "rrd_example.exe" to run.

Let me know how you make out.

Mike
GeneralRe: couple of newby questions
Mike Corley
9:31 8 Jun '09  
Tim -

I think what you are referring to as a class, is actually the namespace declaration in which all NHawk types declared. To include the namespace you must have "using NHAWK" - all CAPS as it is definitely case sensitive. You also have the option of using the fully qualified types e.g. NHAWK.RRD rrd = new NHAWK.RRD(... etc. with out a using statement at all.

Mike
GeneralRe: couple of newby questions
tbhanson
4:56 10 Jun '09  
i think there is something about NHAWK that Resharper doesn't like or vice versa. when I disable Resharper i can work better with this stuff. thx again for the quick help.
QuestionIs RRDFetch implemented?
Marcel Pletosu
5:56 22 Apr '09  
Great article, great work.

Just wondering if the items from the TODO list ended up being implemented.

Thanks,
Marcel.
AnswerRe: Is RRDFetch implemented?
Mike Corley
10:43 22 Apr '09  
Hi Marcel -

I have not yet implemented anything new since the initial release... Although support for RRDFetch etc. would be straight forward, I haven't had any real requests, feedback or bug reports. I was hoping that a few .NET/RRDTool gurus would take interest and change/add some new features. However things evolve, I do intend to complete and maintain the project, as I use it in my own work... which is one of the main reasons why I put it together. I'll probably seek to add support for VDEFs first, then tackle facilities such as RRDFetch etc. I'm realy hooked on the potential for the serialization/deserialization constructs which could be creatively combined existing (native) rrdtool scripts, and with WCF and standard web services.
Thanks for reading!

Mike
GeneralError running tutorial (Win7 / VS2008 / RRDTool 1.2.30)
amg1976
5:33 1 Apr '09  
Running your tutorial i have this error:

ERROR: failed to parse data source 600:NaN

rrd1.ToString() returns this:

create test.rrd --start 920804400 --step 300 DS:speed:COUNTER:600:NaN (Não é um
número)
:NaN (Não é um número) RRA:AVERAGERed faced,5:1:24 RRA:AVERAGERed faced,5:6:10

I've tried setting specific values for min and max on rrd1.addDS(new DS ...) but then i get the same error gr1.graph().

Can you help me?

Thanks in advance,
Adri


Last Updated 22 Aug 2008 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2010