Check_file_age returns wrong date

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Check_file_age returns wrong date

Postby BrunoLosse1 » Wed Oct 31, 2018 7:42 am

When using the check_file_age command, it returns the file's wrong time, causing the parameter to not work correctly.
The server timings are all correct, so I think Nagios itself uses a Timezone.

I've tried setting the # TIMEZONE OFFSET section at the nagios.cfg but it doesn't seem to take effect.
I'm at Brazil btw UTC -3.
BrunoLosse1
 
Posts: 31
Joined: Tue Oct 23, 2018 1:22 pm

Re: Check_file_age returns wrong date

Postby ssax » Wed Oct 31, 2018 4:18 pm

What version of nsclient++ are you running? You can find the version listed next to it in control panel > programs and features.

I found this:

https://forums.nsclient.org/t/timezone-problem-with-checkfile/2194
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 3358
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_file_age returns wrong date

Postby BrunoLosse1 » Thu Nov 08, 2018 7:40 am

ssax wrote:What version of nsclient++ are you running? You can find the version listed next to it in control panel > programs and features.

I found this:

https://forums.nsclient.org/t/timezone-problem-with-checkfile/2194


I have the latest version: 0.5.2035

The post you sent is very old, did they not fix it yet?
BrunoLosse1
 
Posts: 31
Joined: Tue Oct 23, 2018 1:22 pm

Re: Check_file_age returns wrong date

Postby npolovenko » Thu Nov 08, 2018 4:46 pm

@BrunoLosse1, Looks like they added the support for file dates in local time in 2015:
2015-04-08 Michael Medin
check_files: #139 Added support for showing file dates in local time (not just UTC)

Here are some filter options you can use:
filter
creation_l When file was created (local time)
creation_u When file was created (UTC)
access_l Last access time (local time)
access_u Last access time (UTC)

https://docs.nsclient.org/reference/windows/CheckDisk/#check_files
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
npolovenko
Support Tech
 
Posts: 2343
Joined: Mon May 15, 2017 5:00 pm


Return to Nagios Core

Who is online

Users browsing this forum: mcapra and 30 guests