Discussion:
Seeking assistance regarding return graph values for FTP
kody abney
2012-10-17 16:37:04 UTC
Permalink
kody abney [http://community.zenoss.org/people/SMHguru] created the discussion

"Seeking assistance regarding return graph values for FTP"

To view the discussion, visit: http://community.zenoss.org/message/69312#69312

--------------------------------------------------------------
Hello, I'm a new zenoss administrator, trying to learn the system. I've successfully setup most of it, but having an issue with one such device. I'm using a command source ( bash script ) which logs into a remote machine ( ssh keys ), and captures output from a perl script ( which returns the values into nagios format, and sends the values into a text file to be read ) and brings it back to graph periodacally. Everything works fine, but I'm sort of confused on a few things. The way I'm monitring the service (FTP), is by the number of processes running. I choose this method because of the configuration of this layout, sometimes two such daemons may accidentally be started ( user error ), and we cannot use snmp / icmp to accurately monitor this. I'm wondering the value for the graphs, as I want it to show the number of processes over the alotted amount of time ( lets say you look at the graph a week, you can see for a certain amount of time the proccess count was at 0, and investigate). My data source seems correct; as it works and returns a value.

Graph units = Processes+  <--

data point = "create command"  <-- not sure what to put for this format.

I'm experienced with cacti, and orion type monitoring systems. Any assistance in the right direction would be amazingly helpful, as I love the layout of zenoss and want to use it for our whole network / systems. I can provide more information if needed, ( command sources, values, etc.). When I run the command source, it returns ( I suspect ) in correct nagios format; IE.


Preparing Command...
Executing command $ZENHOME/libexec/FTP_checker against *IP address*

Datasource|FTP_check=0  <--- name of data source, returns 0 if the process is OK.


Kind regards,

Kody
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69312#69312]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
kody abney
2012-10-17 16:41:00 UTC
Permalink
kody abney [http://community.zenoss.org/people/SMHguru] created the discussion

"Re: Seeking assistance regarding return graph values for FTP"

To view the discussion, visit: http://community.zenoss.org/message/69313#69313

--------------------------------------------------------------
Also, the reason I suspect this was wrong:

the graph would show integers, ie current: 2.2 , which makes absolutely no sense. I thought it was working correctly at first, because it showed a steady 1.0; but when I turned off the ftp service, the graphs would show 2.2 / 2.1 / random integer values, which don't relate to the number of processes running or the return values.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69313#69313]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
omeganon
2012-10-17 19:14:13 UTC
Permalink
omeganon [http://community.zenoss.org/people/omeganon] created the discussion

"Re: Seeking assistance regarding return graph values for FTP"

To view the discussion, visit: http://community.zenoss.org/message/69317#69317

--------------------------------------------------------------
Was the datapoint created as a GAUGE or COUNTER? GAUGE is for values you want to graph as-is. COUNTER is for values that you want to graph as a rate of change. I suspect you used COUNTER.

Also be aware that all values, no matter the type are treated rate-ish-ly by RRDtool. GAUGE emulates plotting integer values but during intervals when they change, RRDtool will still try to interpolate what it thinks the value would have been at the exact timestamp for it's internal bucket closest to the polling time. As a result, you _will_ end up with non-integer values in certain circumstances.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69317#69317]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
kody abney
2012-10-17 19:25:05 UTC
Permalink
kody abney [http://community.zenoss.org/people/SMHguru] created the discussion

"Re: Seeking assistance regarding return graph values for FTP"

To view the discussion, visit: http://community.zenoss.org/message/69318#69318

--------------------------------------------------------------
I see, so my nagios returns are indeed correct? How would you advise correctly graphing these without going into great detail? It seems that if it returns a 0 = ok in nagios, it should graph 1. Perhaps this format is indeed not the best for me afterall, since I only need codes = OK as in 1 proces, warning = process dead, unknown = 2 or more processes detected. As of now, I have the script like thus;

if detected processes > 1 ; returns nagios code 1, if processes =0, returns nagios code 3. I save the last code, with no comparison, to return unknown status for a possible error.

Many thanks kind sir!!

Kind regards,

A happy camper
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69318#69318]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2012-10-17 19:35:28 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: Seeking assistance regarding return graph values for FTP"

To view the discussion, visit: http://community.zenoss.org/message/69330#69330

--------------------------------------------------------------
Do you need the graphing for some reason, or just an event on a "non good" value? If all you need is the event, then zenoss can interpret nagios script return values as a command datasource:
https://zcaportal.org/wiki/bin/view/ZCA/ZCAFAQ#Why_doesn_39t_my_script_throw_an_event_when_I_return_34bad_34_63 https://zcaportal.org/wiki/bin/view/ZCA/ZCAFAQ#Why_doesn_39t_my_script_throw_an_event_when_I_return_34bad_34_63

--
James Pulver
ZCA Member
LEPP Computer Group
Cornell University
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69330#69330]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
kody abney
2012-10-17 19:53:30 UTC
Permalink
kody abney [http://community.zenoss.org/people/SMHguru] created the discussion

"Re: Seeking assistance regarding return graph values for FTP"

To view the discussion, visit: http://community.zenoss.org/message/69319#69319

--------------------------------------------------------------
You're quite correct, the graphing isn't particulary necessary (except to monitor the service ) , I just want the alert when the process dies. I changed it to counter. I will read that docu and see if I can resolve it. I will reply back if the issue was fixed or not, thank you for the assistance!!
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69319#69319]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
omeganon
2012-10-17 20:01:19 UTC
Permalink
omeganon [http://community.zenoss.org/people/omeganon] created the discussion

"Re: Seeking assistance regarding return graph values for FTP"

To view the discussion, visit: http://community.zenoss.org/message/69321#69321

--------------------------------------------------------------
Post by kody abney
I changed it to counter. I will read that docu and see if I can resolve it. I will reply back if the issue was fixed or not, thank you for the assistance!!
If you changed the datapoint type you'll need to remove the corresponding RRD file under /opt/zenoss/perf/Devices/<hostname> and let it be automatically recreated. It's only set at the time of file creation and can't be changed afterward.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69321#69321]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
kody abney
2012-10-17 20:26:21 UTC
Permalink
kody abney [http://community.zenoss.org/people/SMHguru] created the discussion

"Re: Seeking assistance regarding return graph values for FTP"

To view the discussion, visit: http://community.zenoss.org/message/69323#69323

--------------------------------------------------------------
Damn, yeah I forgot to delete the old rrd. I have changed the syntax to counter, and adjusted the values.

As for running the command via command line; it returns;


[host@]$ ./FTP_checker
Datasource|FTP_check=0
[@host]$

Do I need a command for the datapoint that interprets these? Since it returns 0 meaning OK, I guess it would make sense for a middleman type of command to manipulate 0 into being 1, as in 1 process. And so on.

I have reloaded my config though and am testing the graphs.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69323#69323]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
omeganon
2012-10-17 20:58:37 UTC
Permalink
omeganon [http://community.zenoss.org/people/omeganon] created the discussion

"Re: Seeking assistance regarding return graph values for FTP"

To view the discussion, visit: http://community.zenoss.org/message/69325#69325

--------------------------------------------------------------
Post by kody abney
Damn, yeah I forgot to delete the old rrd. I have changed the syntax to counter, and adjusted the values.
Again, you certainly want it to be 'GAUGE', not counter, if you want to graph the actual performance data value and not it's rate of change over time.
Post by kody abney
Do I need a command for the datapoint that interprets these? Since it returns 0 meaning OK, I guess it would make sense for a middleman type of command to manipulate 0 into being 1, as in 1 process. And so on.
When you created the command in Zenoss, you should have also created a datapoint associated with the command name 'FTP_check', then created a Graph that uses the datapoint 'FTP_check'.

As far as changing the FTP_check=x value, I'd think you'd just do that in the bash or perl script that you're already using to come up with that value. In case you're confused, this is _not_ the same as the exit code that is used to determine the status of the service (i.e. OK, WARNING, CRITICAL, UNKNOWN). It's just some value that you'd like to  graph.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69325#69325]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
kody abney
2012-10-17 21:28:07 UTC
Permalink
kody abney [http://community.zenoss.org/people/SMHguru] created the discussion

"Re: Seeking assistance regarding return graph values for FTP"

To view the discussion, visit: http://community.zenoss.org/message/69341#69341

--------------------------------------------------------------
I see, I see. I appreciate this assistance greatly. I have decided to just leave the graph, as it is quite meaningless.

I just decided to do commanddata source > data point -> eventclass /status/OSproccess/FTP_class . Just working on setting the regex / rules / transform properties, and that will house the event that I want to be triggered --> notification. Thank you for all the assistance, Zenoss has a much more helpful / generous community then much software I've used in the past.

Kind regards,

Kody
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69341#69341]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
omeganon
2012-10-17 19:58:47 UTC
Permalink
omeganon [http://community.zenoss.org/people/omeganon] created the discussion

"Re: Seeking assistance regarding return graph values for FTP"

To view the discussion, visit: http://community.zenoss.org/message/69320#69320

--------------------------------------------------------------
The return code is not being graphed, ever; it's the performance data. I am presuming that you created a datapoint named "FTP_check" and are graphing that value. The value is determined by what you say it is after the |. Here, you say it's '0' --

    |FTP_check=0

The graph should be graphing a value of '0'. I can't explain why it's graphing something else based on the info you've provided. I'd need to know the datapoint name and it's type as well as some subset of 'zecommand run -v10 -d <yourdevicename> 2>&1 | grep FTP_check'.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69320#69320]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
kody abney
2012-10-17 22:33:00 UTC
Permalink
kody abney [http://community.zenoss.org/people/SMHguru] created the discussion

"Re: Seeking assistance regarding return graph values for FTP"

To view the discussion, visit: http://community.zenoss.org/message/69342#69342

--------------------------------------------------------------
Seemingly having some trouble on the event as well ( i think) ; this is my layout.

datasource -  class key =FTP_key

class = /Status/OSProcess/OS_ftp which has a mapping :
http://10.3.23.51:8080/zport/dmd/Events/Status/OSProcess/OS_ftp/instances/FTP_map FTP_map - event class key = FTP_mapkey ; do i need to add an event to the mapping? (i get an error actually, bad context.)

which uses the regex of 1-3; which are all the bad values from my commands output, so it should trigger the event --> trigger notification.

I then have a trigger;

FTP_trigger --> with the rules;

event class - equals - /status/osprocess/os_ftp
event key - equals - FTP_key
event class key - equals - FTP_map
device prod state - equals production ,

which is tied to the "FTP_notification" I made, with the trigger attached.

Considering the datasource command works fine, and also graphs output even though not correct, I assume it's the event, or regex tied to the event for parsing. I did go through the documentation, and don't see much else I did incorrectly. I know email works, since it's alerting me for another device.


Kind regards
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69342#69342]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2012-10-18 13:37:31 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: Seeking assistance regarding return graph values for FTP"

To view the discussion, visit: http://community.zenoss.org/message/69336#69336

--------------------------------------------------------------
I'm really not sure what you're trying to do in the recent post, but the best way to do this is clear out any mappings or whatever and generate an event. See where this event ends up. If it's /Unknown, use the GUI to map it to an appropriate event class - maybe make one yourself out of /Unknown.

Once you know the event details, create a trigger that matches on the event. Start with a simple match on the subject line - works for me. Then set a notification to subscribe to the trigger, and bam, you should be good to go.

--
James Pulver
ZCA Member
LEPP Computer Group
Cornell University
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69336#69336]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
omeganon
2012-10-18 14:39:48 UTC
Permalink
omeganon [http://community.zenoss.org/people/omeganon] created the discussion

"Re: Seeking assistance regarding return graph values for FTP"

To view the discussion, visit: http://community.zenoss.org/message/69350#69350

--------------------------------------------------------------
Is this even necessary? If the command exits with a nagios-compatible exit code then won't Zenoss set it's state appropriately? Then all you need is a general trigger that matches on new, critical, Production events and associate that with an email notification, right? That's how we've been doing it for years. Mapping to an event class has been more of an afterthought to us and we certainly have not been creating notification triggers specific enough to match returned textual output. If you're doing that then your check command needs work, IMHO. The only time we've been doing that is pretty much to suppress snmp traps that we don't really care about. Am I missing something interesting/important?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69350#69350]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...