[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [hobbit] help with NCV



Hi

NCV is going to get rather grumpy with that output.
It's going to try and parse every line with a : or an = in it, and try and put it into the database somehow.

To get around it, you need to make sure there are no other lines containing a : or = anywhere in the output, which does make displaying time a little difficult.
With a crafty sed command, you can change 12:45:02 to something that looks like a 24-hour clock output, so it ends up like 12h45.02

ThIs will leave the "Users Active" line as the only one with a : and all will be well.

NCV can react strangely with spaces and _ in the field names too, so I would suggest changing the active users : x to
Active Users - X
Then at the bottom of your output, have the following 3 lines
echo '<FONT COLOR="Black">' >> $OUTFILE
echo "Users=$NumOfUsers" >> $OUTFILE
echo '</FONT>' >> $OUTFILE

Now we have a single word for a fieldname, and it is the only line with a : or a =
Because you set the font to black, it will be invisible too, so it will not disrupt you output formatting.

To make it work, in hobbitserver.cfg, you need to make a 3 changes, but don't panic, they are easy.

Let's assume your test is called mytest.
In the line starting TEST2RRD= you need to add an entry "mytest=ncv"
(Remember all entries are , seperated)

Then if you want the graph to appear in the trends column you need to add mytest to the line GRAPHS=

The last change is a new line, further down, normally just before the BB extentions definitions.
Add the line
NCV_mytest="Users:GAUGE"

You have to restart hobbit after these changes.
Give it some time, and after a while you should see the rrd files will start getting populated.

Now you have to define your graphs in hobbitgraph.cfg, but we can discuss that another day. :-)

Cheers
    Vernon




________________________________
From: Gatis A. [mailto:gatis.anee (at) gmail.com]
Sent: Tuesday, 4 November 2008 9:10 PM
To: hobbit (at) hswn.dk
Subject: [hobbit] help with NCV

Hi,

Could you help me with configuring NCV please.
I want to graph "USERS ACTIVE".

If there is a plain

"USERS ACTIVE: x"

Then graph is made fine, but if there is something more I get:

2008-11-04 14:04:30 RRD error updating /home/hob/hob/data/rrd/host1/rbackup.rrd from 127.0.0.1<http://127.0.0.1>: tmplt contains more DS definitions than RRD

How can I tell NCV to ignore everything beyond "USERS ACTIVE" line?

This is my output:


USERS ACTIVE: 6

UNIX_PID     LOGON_TIME           MACHINE    USERNAME        MODULE                              PROGRAM                             SID        SERIAL
------------ -------------------- ---------- --------------- ----------------------------------- ----------------------------------- ------ ----------


25579        04-nov-2008 11:04:06 host1      MON1            oracle (at) host1 (TNS V1-V3)            oracle (at) host1  (TNS V1-V3)           19          52205
2501         04-nov-2008 11:04:06 host1      MON1            oracle (at) host1 (TNS V1-V3)            oracle (at) host1  (TNS V1-V3)           19          52205


13730        04-nov-2008 12:01:09 host2      BB              SQL*Plus                            oracle (at) host2  (P001)                26          58955
4353         04-nov-2008 12:01:09 host2      BB              SQL*Plus                            oracle (at) host2  (P001)                26          58955

19054        04-nov-2008 12:01:09 host2      BB              SQL*Plus                            sqlplus (at) host2 (TNS V1-V3)           630         26167

18987        04-nov-2008 12:01:09 host2      BB              SQL*Plus                            oracle (at) host2  (P001)                665         55557



NOTICE: This email and any attachments are confidential. 
They may contain legally privileged information or 
copyright material. You must not read, copy, use or 
disclose them without authorisation. If you are not an 
intended recipient, please contact us at once by return 
email and then delete both messages and all attachments.