Discussion:
problem with ssh monitoring
Henry Lin
2012-10-19 05:55:03 UTC
Permalink
Henry Lin [http://community.zenoss.org/people/hlin] created the discussion

"problem with ssh monitoring"

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

--------------------------------------------------------------
Hi,

I have Zenoss 4.2 sp1 installed and  want to monitor several  linux servers with ssh.

linux server is CentOS 5.x based
monitoring template is /Server/SSH/Linux

After  modeling, only file system can not display in the components.
There is one event showing like this

Problem while executing plugin zenoss.cmd.df

| Event Class: | /Status/Update (http://10.8.249.220:8080/zport/dmd/Events/Status/Update) |
| Status: | New |
| Message: | Traceback (most recent call last): File "/opt/zenoss/Products/DataCollector/zenmodeler.py", line 634, in processClient datamaps = plugin.process(device, results, self.log) File "/opt/zenoss/Products/DataCollector/plugins/zenoss/cmd/df.py", line 58, in process else: om.totalBlocks = long(tblocks) ValueError: invalid literal for long() with base 10: '1024-\xe5\x8d\x80\xe6\xae\xb5' |

i don't know what it is mean, could someone help me some guideline?

Thanks
--------------------------------------------------------------

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

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]
pwarren
2012-10-19 12:40:59 UTC
Permalink
pwarren [http://community.zenoss.org/people/pwarren] created the discussion

"Re: problem with ssh monitoring"

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

--------------------------------------------------------------
Would it be possible to run the following two commands on one of the systems which is failing and attach the output to this thread?

$ df -Pk > df.stdout.txt 2> df.stderr.txt
$ LANG=C df -Pk > df_c.stdout.txt 2> df_c.stderr.txt

Attach the 4 files (df.stdout.txt, df.stderr.txt, df_c.stdout.txt, and df_c.stderr.txt) to this thread. You can leave off the *.stderr.txt files if they are empty.

BTW - there was a recent change to that plug-in to ignore invalid sizes in http://jira.zenoss.com/jira/browse/ZEN-3592 http://jira.zenoss.com/jira/browse/ZEN-3592. However, the problem you are reporting looks different.

Thanks,

Philip Warren
--------------------------------------------------------------

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

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]
Henry Lin
2012-10-19 13:27:12 UTC
Permalink
Henry Lin [http://community.zenoss.org/people/hlin] created the discussion

"Re: problem with ssh monitoring"

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

--------------------------------------------------------------
Hi Philip,


*.stderr.txt files are empty. i attach two files for you.
It looks like the normal df command output.

thank you
--------------------------------------------------------------

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

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]
pwarren
2012-10-19 15:01:54 UTC
Permalink
pwarren [http://community.zenoss.org/people/pwarren] created the discussion

"Re: problem with ssh monitoring"

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

--------------------------------------------------------------
Henry,

As I expected, this is an issue with the default language used by the system monitored by Zenoss. If you are using a separate read-only account for Zenoss monitoring, can you try setting the following variables in the profile used by Zenoss?

export LANG=C
export LC_ALL=C

It would also be good to open a bug to track this down. It is possible (although it can be blocked by the SSH server) to send environment variables, and these should be set by default for all commands executed remotely.

-- Philip
--------------------------------------------------------------

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

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]
Henry Lin
2012-10-20 07:19:24 UTC
Permalink
Henry Lin [http://community.zenoss.org/people/hlin] created the discussion

"Re: problem with ssh monitoring"

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

--------------------------------------------------------------
Hi Philip,

I set these two  variables on the linux server that i want to monitor.

export LANG=C
export LC_ALL=C

After remodeling, there is one event  showing

Problem while executing plugin zenoss.cmd.df

| Event Class: | /Status/Update (http://10.8.249.220:8080/zport/dmd/Events/Status/Update) |
| Status: | New |
| Message: | Traceback (most recent call last): File "/opt/zenoss/Products/DataCollector/zenmodeler.py", line 634, in processClient datamaps = plugin.process(device, results, self.log) File "/opt/zenoss/Products/DataCollector/plugins/zenoss/cmd/df.py", line 58, in process else: om.totalBlocks = long(tblocks) ValueError: invalid literal for long() with base 10: '1024-\xe5\x8d\x80\xe6\xae\xb5' |

Do you mean it could be a bug that i can report to bug tracking system( http://jira.zenoss.com http://jira.zenoss.com)?

Thanks

Henry Lin
--------------------------------------------------------------

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

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]
pwarren
2012-10-22 22:27:02 UTC
Permalink
pwarren [http://community.zenoss.org/people/pwarren] created the discussion

"Re: problem with ssh monitoring"

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

--------------------------------------------------------------
It appears changing the environment variables didn't work as expected. Did you set them in the .profile/.bash_profile or the .bashrc file?

Please open an issue in JIRA.

Thanks,

Philip Warren
--------------------------------------------------------------

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

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]
Henry Lin
2012-10-23 09:00:59 UTC
Permalink
Henry Lin [http://community.zenoss.org/people/hlin] created the discussion

"Re: problem with ssh monitoring"

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

--------------------------------------------------------------
I set them in .bash_profile, then
restart the linux server and remodeling, error is still occurred.

i already create this issue in bugtracking system.


Thanks your help

Henry Lin
--------------------------------------------------------------

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

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]
pwarren
2012-10-23 14:06:40 UTC
Permalink
pwarren [http://community.zenoss.org/people/pwarren] created the discussion

"Re: problem with ssh monitoring"

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

--------------------------------------------------------------
Can you try this patch to see if it addresses the issue in your environment? It can be downloaded from this location:

https://dl.dropbox.com/u/1666503/ZEN-3883-42.patch https://dl.dropbox.com/u/1666503/ZEN-3883-42.patch

To apply the patch, run (as the 'zenoss' user):

$ cp ZEN-3883-42.patch $ZENHOME
$ cd $ZENHOME
$ patch -p0 -u --dry-run < ZEN-3883-42.patch
--> If the above command is successful (no errors), run:
$ patch -p0 -u < ZEN-3883-42.patch

After applying the patch, restart zenmodeler on the system to verify the fix. If you ever wish to revert the change, run:

$ cd $ZENHOME
$ patch -p0 -u -R < ZEN-3883-42.patch

Thanks,

Philip Warren
--------------------------------------------------------------

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

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]
pwarren
2012-10-23 14:13:25 UTC
Permalink
pwarren [http://community.zenoss.org/people/pwarren] created the discussion

"Re: problem with ssh monitoring"

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

--------------------------------------------------------------
For the patch to work, you will also need these lines uncommented/added to the /etc/ssh/sshd_config file (or equivalent) on your system. These are taken from a RHEL6 system:

# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
--------------------------------------------------------------

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

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]
Henry Lin
2012-10-24 03:56:18 UTC
Permalink
Henry Lin [http://community.zenoss.org/people/hlin] created the discussion

"Re: problem with ssh monitoring"

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

--------------------------------------------------------------
Hi Philip,


There is patch error , i attach the picture for your checking.


Thanks


Henry Lin
--------------------------------------------------------------

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

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]
pwarren
2012-10-24 22:15:56 UTC
Permalink
pwarren [http://community.zenoss.org/people/pwarren] created the discussion

"Re: problem with ssh monitoring"

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

--------------------------------------------------------------
The patch needs to be applied from ZENHOME (/opt/zenoss), not HOME (/home/zenoss). You missed the second step in the instructions listed above ('cd $ZENHOME').

Thanks,

Philip Warren
--------------------------------------------------------------

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

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]
Henry Lin
2012-10-25 10:56:17 UTC
Permalink
Henry Lin [http://community.zenoss.org/people/hlin] created the discussion

"Re: problem with ssh monitoring"

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

--------------------------------------------------------------
ok, it works now.


but i can skip the locale setting in each linux server and it also works.



/etc/ssh/sshd_config
1. Accept locale-related environment variables

AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS


Really appreciated your help
--------------------------------------------------------------

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

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...