Dropping packet with future timestamp, NSCA

Vinogratzky vinogratzky at gmx.ch
Fri Jun 13 16:44:30 CEST 2008


Just change the source:
---8<---
       /* check the timestamp in the packet */
        packet_time=(time_t)ntohl(receive_packet.timestamp);
        time(&current_time);
        //if(packet_time>current_time){
        //        syslog(LOG_ERR,"Dropping packet with future
        //        timestamp.");
        //        /*return;*/
        //      close(sock);
        //        if(mode==SINGLE_PROCESS_DAEMON)
        //                return;
        //        else
        //                do_exit(STATE_OK);
        //        }
        //else{
                packet_age= abs ( (unsigned long)(current_time-packet_time) );
                syslog(LOG_ERR,"Time diff: %lu seconds", packet_age);
                if(max_packet_age>0 && (packet_age>max_packet_age)){
                        syslog(LOG_ERR,"Dropping packet with stale timestamp - packet was %lu seconds old or new.",packet_age);
                        /*return;*/
                        close(sock);
                        if(mode==SINGLE_PROCESS_DAEMON)
                                return;
                        else
                                do_exit(STATE_OK);
                        }
        //        }
---8<---
If you want, you can see now the "Time diff" in the syslog.
Workes for me.

Perhaps that should be an option in the next release!
Chris


On Do, Jun 12, 2008 at 06:08:10 +0200, Vinogratzky wrote:
> Hi list,
> 
> I have some passive checks with NSCA and my clients are a few seconds
> ahead. 
> The server rejects the package with:
> ---8<---
> nsca[10986]: Dropping packet with future timestamp.
> ---8<---
> 
> max_packet_age=0
> doesn't help here.
> 
> Any hints?
> (No, I'm not able to sync the Clients with ntp.)
> 
> Thx,
> Chris
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list