If you are not using the "sharedscripts" directive, then your postrotate script receives, as $1, the file that triggered the log rotation. This might help if you're trying to use a generic script with multiple logrotate stanzas. That is, given something like this:
/var/log/sample1.log /var/log/sample[23].log {
..config...
}
If any matching files needs to be rotated, your script will be called with $1 set to "/var/log/sample1.log", "/var/log/sample2.log", or "/var/log/sample3.log" as appropriate. You can then append ".1" to find the file that was just rotated.
If you use the "sharedscripts" option, then you script would be called with $1 set to "/var/log/sample1.log /var/log/sample[23].log" (which will help you identify a particular stanza but not the exact file).
Hopefully this gives you a place to start. Note that this will only work for logrotate > v3.7.5.